diff options
author | luukvbaal <luukvbaal@gmail.com> | 2023-06-02 17:26:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 23:26:41 +0800 |
commit | c45a111e35478d2173d8ed5bab2eb73ab2de590c (patch) | |
tree | c3227d91efb331e903c15f09cdd8f63725d3d0e3 /test | |
parent | aa130d0c7ea69a05330d0b054b414cc3a15dac45 (diff) | |
download | rneovim-c45a111e35478d2173d8ed5bab2eb73ab2de590c.tar.gz rneovim-c45a111e35478d2173d8ed5bab2eb73ab2de590c.tar.bz2 rneovim-c45a111e35478d2173d8ed5bab2eb73ab2de590c.zip |
vim-patch:9.0.1599: Cursor not adjusted when 'splitkeep' is not "cursor" (#23884)
Problem: Cursor not adjusted when near top or bottom of window and
'splitkeep' is not "cursor".
Solution: Move boundary checks to outer cursor move functions, inner
functions should only return valid cursor positions. (Luuk van
Baal, closes vim/vim#12480)
https://github.com/vim/vim/commit/a109f39ef54bc3894768170f02c1b6ac56164488
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_window_cmd.vim | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/old/testdir/test_window_cmd.vim b/test/old/testdir/test_window_cmd.vim index d4ff241366..7d4932a2b5 100644 --- a/test/old/testdir/test_window_cmd.vim +++ b/test/old/testdir/test_window_cmd.vim @@ -1763,9 +1763,20 @@ endfunc func Test_splitkeep_misc() set splitkeep=screen - set splitbelow call setline(1, range(1, &lines)) + " Cursor is adjusted to start and end of buffer + norm M + wincmd s + resize 1 + call assert_equal(1, line('.')) + wincmd j + norm GM + resize 1 + call assert_equal(&lines, line('.')) + only! + + set splitbelow norm Gzz let top = line('w0') " No scroll when aucmd_win is opened |