diff options
author | luukvbaal <luukvbaal@gmail.com> | 2024-07-26 00:32:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 06:32:54 +0800 |
commit | dd61be59af5bb97f2f28ec0040ab1597795a48c5 (patch) | |
tree | b644df4918710ec4760b8ca7362c2dd5ffc27546 /test/old | |
parent | 807eb4434c890118e632ec57e396fd151c441714 (diff) | |
download | rneovim-dd61be59af5bb97f2f28ec0040ab1597795a48c5.tar.gz rneovim-dd61be59af5bb97f2f28ec0040ab1597795a48c5.tar.bz2 rneovim-dd61be59af5bb97f2f28ec0040ab1597795a48c5.zip |
vim-patch:9.1.0617: Cursor moves beyond first line of folded end of buffer (#29859)
Problem: Cursor moves beyond start of a folded range at the end of a buffer.
Solution: Move cursor to start of fold when going beyond end of buffer.
Check that cursor moved to detect FAIL in outer cursor function.
(Luuk van Baal)
https://github.com/vim/vim/commit/dc373d456b5919ed2b8f83e8642c115f646ca93d
Diffstat (limited to 'test/old')
-rw-r--r-- | test/old/testdir/test_fold.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/old/testdir/test_fold.vim b/test/old/testdir/test_fold.vim index aca497f28d..a9842ae437 100644 --- a/test/old/testdir/test_fold.vim +++ b/test/old/testdir/test_fold.vim @@ -1659,4 +1659,18 @@ func Test_foldexpr_end_fold() bwipe! endfunc +" Test moving cursor down to or beyond start of folded end of buffer. +func Test_cursor_down_fold_eob() + call setline(1, range(1, 4)) + norm Gzf2kj + call assert_equal(2, line('.')) + norm zojzc + call assert_equal(3, line('.')) + norm j + call assert_equal(3, line('.')) + norm k2j + call assert_equal(4, line('.')) + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |