Remove recursion not to fail in case of many delimiters (> maxfuncdepth)

This commit is contained in:
Junegunn Choi
2013-10-13 03:31:05 +09:00
parent cb7306341c
commit 256e5b83ab
4 changed files with 50 additions and 21 deletions

21
test/fixed.vader Normal file
View File

@@ -0,0 +1,21 @@
Given (Table):
|a|b|c|d|
| -|-|>-|-|
|aaa|bbb|ccc|ddd|
Do (Partial alignment around 1st |):
\<C-V>ljj\<Enter>|
Expect (Right margin should be correctly attached):
| a|b|c|d|
| -|-|>-|-|
| aaa|bbb|ccc|ddd|
Given (empty buffer):
Execute (Aligning lines with many delimiters should not fail):
call visualmode(1)
call setline(1, repeat('|', &maxfuncdepth + 1))
%EasyAlign*|
AssertEqual (&maxfuncdepth + 1) * 3 - 2, len(getline(1))