forked from aniani/vim
patch 9.0.1213: adding a line below the last one does not expand fold
Problem: Adding a line below the last one does not expand fold.
Solution: Do not skip mark_adjust() when adding lines below the last one.
(Brandon Simmons, closes #11832, closes #10698)
This commit is contained in:
committed by
Bram Moolenaar
parent
66bb9ae70f
commit
da3dd7d857
@@ -1683,4 +1683,17 @@ func Test_indent_with_L_command()
|
||||
V{zf8=Lu
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" Make sure that when there is a fold at the bottom of the buffer and a newline
|
||||
" character is appended to the line, the fold gets expanded (instead of the new
|
||||
" line not being part of the fold).
|
||||
func Test_expand_fold_at_bottom_of_buffer()
|
||||
new
|
||||
" create a fold on the only line
|
||||
fold
|
||||
execute "normal A\<CR>"
|
||||
call assert_equal([1, 1], range(1, 2)->map('foldlevel(v:val)'))
|
||||
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user