aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-05-09 06:11:56 +0800
committerGitHub <noreply@github.com>2024-05-09 06:11:56 +0800
commite4e230a0cd1b2b0aaee60a5a4a7fcb8df508e7a0 (patch)
treeab78ff717818f4896dffa73d8457951408cb15cc /test/old/testdir
parent064f3e42e8d33b0a9e560dfb7c9a42b2fc1ed868 (diff)
downloadrneovim-e4e230a0cd1b2b0aaee60a5a4a7fcb8df508e7a0.tar.gz
rneovim-e4e230a0cd1b2b0aaee60a5a4a7fcb8df508e7a0.tar.bz2
rneovim-e4e230a0cd1b2b0aaee60a5a4a7fcb8df508e7a0.zip
vim-patch:9.1.0397: Wrong display with 'smoothscroll' when changing quickfix list (#28674)
Problem: Wrong display with 'smoothscroll' when changing quickfix list. Solution: Reset w_skipcol when replacing quickfix list (zeertzjq). closes: vim/vim#14730 https://github.com/vim/vim/commit/c7a8eb5ff2ddd919e6f39faec93d81c52874695a
Diffstat (limited to 'test/old/testdir')
-rw-r--r--test/old/testdir/test_scroll_opt.vim45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/old/testdir/test_scroll_opt.vim b/test/old/testdir/test_scroll_opt.vim
index 50b0e13ba4..c7b986e040 100644
--- a/test/old/testdir/test_scroll_opt.vim
+++ b/test/old/testdir/test_scroll_opt.vim
@@ -964,6 +964,51 @@ func Test_smoothscroll_insert_bottom()
call StopVimInTerminal(buf)
endfunc
+func Test_smoothscroll_in_qf_window()
+ CheckFeature quickfix
+ CheckScreendump
+
+ let lines =<< trim END
+ set nocompatible display=lastline
+ copen 5
+ setlocal number smoothscroll
+ let g:l = [{'text': 'foo'}] + repeat([{'text': join(range(30))}], 10)
+ call setqflist(g:l, 'r')
+ normal! G
+ wincmd t
+ let g:l1 = [{'text': join(range(1000))}]
+ END
+ call writefile(lines, 'XSmoothScrollInQfWindow', 'D')
+ let buf = RunVimInTerminal('-u NONE -S XSmoothScrollInQfWindow', #{rows: 20, cols: 60})
+ call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_1', {})
+
+ call term_sendkeys(buf, ":call setqflist([], 'r')\<CR>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_2', {})
+
+ call term_sendkeys(buf, ":call setqflist(g:l, 'r')\<CR>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_3', {})
+
+ call term_sendkeys(buf, ":call setqflist(g:l1, 'r')\<CR>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_4', {})
+
+ call term_sendkeys(buf, "\<C-W>b$\<C-W>t")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_5', {})
+
+ call term_sendkeys(buf, ":call setqflist([], 'r')\<CR>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_2', {})
+
+ call term_sendkeys(buf, ":call setqflist(g:l1, 'r')\<CR>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_4', {})
+
+ call term_sendkeys(buf, "\<C-W>b$\<C-W>t")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_5', {})
+
+ call term_sendkeys(buf, ":call setqflist(g:l, 'r')\<CR>")
+ call VerifyScreenDump(buf, 'Test_smoothscroll_in_qf_window_3', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_smoothscroll_in_zero_width_window()
set cpo+=n number smoothscroll
set winwidth=99999 winminwidth=0