diff options
author | mityu <mityu.mail@gmail.com> | 2022-09-14 17:27:36 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-14 17:27:36 +0100 |
commit | e697d488901b6321ddaad68b553f0a434c97d849 (patch) | |
tree | 140cf4e5890b2b4a64e51727aa0ec53a74aff9e9 /src/testdir | |
parent | 702bd6c7c61073c0907fd7608911aebee4acd337 (diff) |
patch 9.0.0465: cursor moves when cmdwin is closed when 'splitscroll' is offv9.0.0465
Problem: Cursor moves when cmdwin is closed when 'splitscroll' is off.
Solution: Temporarily set 'splitscroll' when jumping back to the original
window. (closes #11128)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_window_cmd.vim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim index c9f9caa347..872e1bac18 100644 --- a/src/testdir/test_window_cmd.vim +++ b/src/testdir/test_window_cmd.vim @@ -1734,9 +1734,13 @@ func Test_splitscroll_with_splits() above copen | wincmd j call assert_equal(win_screenpos(0)[0] - tabline, line("w0")) - " No scroll when opening cmdwin - only | norm ggLq: + " No scroll when opening cmdwin, and no cursor move when closing + " cmdwin. + only | norm ggL + let curpos = getcurpos() + norm q: call assert_equal(1, line("w0")) + call assert_equal(curpos, getcurpos()) " Scroll when cursor becomes invalid in insert mode norm Lic |