summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_fold.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_fold.vim')
-rw-r--r--src/testdir/test_fold.vim20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_fold.vim b/src/testdir/test_fold.vim
index 3abb81aaff..52185dca43 100644
--- a/src/testdir/test_fold.vim
+++ b/src/testdir/test_fold.vim
@@ -1459,4 +1459,24 @@ func Test_fold_split()
bw!
endfunc
+" Make sure that when you append under a blank line that is under a fold with
+" the same indent level as your appended line, the fold expands across the
+" blank line
+func Test_indent_append_under_blank_line()
+ new
+ let lines =<< trim END
+ line 1
+ line 2
+ line 3
+ END
+ call setline(1, lines)
+ setlocal sw=2
+ setlocal foldmethod=indent foldenable
+ call assert_equal([0, 1, 1], range(1, 3)->map('foldlevel(v:val)'))
+ call append(3, '')
+ call append(4, ' line 5')
+ call assert_equal([0, 1, 1, 1, 1], range(1, 5)->map('foldlevel(v:val)'))
+ bw!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab