mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-11 03:13:48 -05:00
Remove recursion not to fail in case of many delimiters (> maxfuncdepth)
This commit is contained in:
21
test/fixed.vader
Normal file
21
test/fixed.vader
Normal 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))
|
||||
|
||||
12
test/fixme.vader
Normal file
12
test/fixme.vader
Normal file
@@ -0,0 +1,12 @@
|
||||
# It is currently possible that EasyAlign command incorrectly judges
|
||||
# that it was executed in block-wise visual mode
|
||||
Given:
|
||||
a|b|c
|
||||
|
||||
Do (FIXME invalid judgement - block-wise visual mode):
|
||||
\<C-V>\<Esc>
|
||||
:%EasyAlign|\<CR>
|
||||
|
||||
Expect:
|
||||
a | b | c
|
||||
|
||||
@@ -1283,16 +1283,3 @@ Expect:
|
||||
a = b = c
|
||||
aabba = bbbbb
|
||||
|
||||
Given (Table):
|
||||
|a|b|c|d|
|
||||
| -|-|>-|-|
|
||||
|aaa|bbb|ccc|ddd|
|
||||
|
||||
Do (Partial alignment around 1st |):
|
||||
\<C-V>ljj\<Enter>|
|
||||
|
||||
Expect (Right margin correctly attached):
|
||||
| a|b|c|d|
|
||||
| -|-|>-|-|
|
||||
| aaa|bbb|ccc|ddd|
|
||||
|
||||
|
||||
Reference in New Issue
Block a user