diff options
author | mityu <mityu.mail@gmail.com> | 2022-09-15 17:44:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-15 17:44:07 +0100 |
commit | 12167d8b84c4a99751d9928f1a9a59c90b14931f (patch) | |
tree | 08957c14262a49d0b320d290323012db3ccb05ee | |
parent | b46c083a5ed9e0c4ac5f3aec577946dcbe8c9dc5 (diff) | |
download | vim-git-12167d8b84c4a99751d9928f1a9a59c90b14931f.tar.gz |
patch 9.0.0471: no test for what patch 9.0.0469 fixesv9.0.0471
Problem: No test for what patch 9.0.0469 fixes.
Solution: Add a test. (closes #11140)
-rw-r--r-- | src/testdir/test_window_cmd.vim | 26 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim index 872e1bac1..cbf2db563 100644 --- a/src/testdir/test_window_cmd.vim +++ b/src/testdir/test_window_cmd.vim @@ -1770,4 +1770,30 @@ func Test_splitscroll_with_splits() set splitscroll& endfunc +function Test_nosplitscroll_cmdwin_cursor_position() + set nosplitscroll + call setline(1, range(&lines)) + + " No scroll when cursor is at near bottom of window and cusor position + " recompution (done by line('w0') in this test) happens while in cmdwin. + normal! G + let firstline = line('w0') + autocmd CmdwinEnter * ++once autocmd WinEnter * ++once call line('w0') + execute "normal! q:\<C-w>q" + redraw! + call assert_equal(firstline, line('w0')) + + " User script can change cursor position successfully while in cmdwin and it + " shouldn't be changed when closing cmdwin. + execute "normal! Gq:\<Cmd>call win_execute(winnr('#')->win_getid(), 'call cursor(1, 1)')\<CR>\<C-w>q" + call assert_equal(1, line('.')) + call assert_equal(1, col('.')) + + execute "normal! Gq:\<Cmd>autocmd WinEnter * ++once call cursor(1, 1)\<CR>\<C-w>q" + call assert_equal(1, line('.')) + call assert_equal(1, col('.')) + + %bwipeout! + set splitscroll& +endfunction " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index 3f832ad0c..aa8159e82 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 471, +/**/ 470, /**/ 469, |