diff options
Diffstat (limited to 'src/nvim/testdir/test_fold.vim')
-rw-r--r-- | src/nvim/testdir/test_fold.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 538b6b622e..327f0f73f2 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -970,4 +970,23 @@ func Test_indent_one_line_fold_close() bw! endfunc +" Make sure that when appending [an indented line then a blank line] right +" before a single indented line, the resulting extended fold can be closed +func Test_indent_append_blank_small_fold_close() + new + setlocal sw=2 foldmethod=indent + " at first, the fold at the second line can't be closed since it's smaller + " than foldminlines + let lines =<< trim END + line 1 + line 4 + END + call setline(1, lines) + call append(1, [' line 2', '']) + " close all folds + normal zM + call assert_notequal(-1, foldclosed(2)) " the fold should be closed now + bw! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |