diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-01-18 07:33:18 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-18 07:33:18 +0800 |
| commit | 0133fbb37ab451edc08e3b01201777c58d3fd931 (patch) | |
| tree | 5cce0072e43a2c7242c9bbdacddc905d8df585e4 /src/nvim/testdir | |
| parent | 1453c7163d1cc94c8ff5b21dc7669195587e4461 (diff) | |
| download | rneovim-0133fbb37ab451edc08e3b01201777c58d3fd931.tar.gz rneovim-0133fbb37ab451edc08e3b01201777c58d3fd931.tar.bz2 rneovim-0133fbb37ab451edc08e3b01201777c58d3fd931.zip | |
vim-patch:9.0.1213: adding a line below the last one does not expand fold (#21869)
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 vim/vim#11832, closes vim/vim#10698)
https://github.com/vim/vim/commit/da3dd7d857ba4fb4bf408dedd1d9d6a2d5e2ae9f
Co-authored-by: Brandon Simmons <simmsbra@gmail.com>
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_fold.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_fold.vim b/src/nvim/testdir/test_fold.vim index 130ad9c7e1..19415286ad 100644 --- a/src/nvim/testdir/test_fold.vim +++ b/src/nvim/testdir/test_fold.vim @@ -1483,4 +1483,17 @@ func Test_indent_with_L_command() 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 + " vim: shiftwidth=2 sts=2 expandtab |