aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-06 06:26:13 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-06-06 06:37:23 +0800
commit9978a9996dae9b62763db6772e7f1f777caacb45 (patch)
tree417293aef035b9ab312fd2d91d3c642930af7ba6 /test/old/testdir
parentc1ee187f82141d778335955c9603c69e6f4785d7 (diff)
downloadrneovim-9978a9996dae9b62763db6772e7f1f777caacb45.tar.gz
rneovim-9978a9996dae9b62763db6772e7f1f777caacb45.tar.bz2
rneovim-9978a9996dae9b62763db6772e7f1f777caacb45.zip
vim-patch:9.0.1603: display wrong if scrolling multiple lines with 'smoothscroll'
Problem: Display wrong when scrolling multiple lines with 'smoothscroll' set. Solution: Redraw when w_skipcol changed. (closes vim/vim#12477, closes vim/vim#12468) https://github.com/vim/vim/commit/3c802277604a6b21110e41bedfe4c937ba7c2b7d
Diffstat (limited to 'test/old/testdir')
-rw-r--r--test/old/testdir/test_scroll_opt.vim24
1 files changed, 23 insertions, 1 deletions
diff --git a/test/old/testdir/test_scroll_opt.vim b/test/old/testdir/test_scroll_opt.vim
index 48b8cb301f..1cd8bbfc84 100644
--- a/test/old/testdir/test_scroll_opt.vim
+++ b/test/old/testdir/test_scroll_opt.vim
@@ -780,7 +780,7 @@ func Test_smoothscroll_incsearch()
call setline(14, 'bbbb')
END
call writefile(lines, 'XSmoothIncsearch', 'D')
- let buf = RunVimInTerminal('-S XSmoothIncsearch', #{rows: 8, cols:40})
+ let buf = RunVimInTerminal('-S XSmoothIncsearch', #{rows: 8, cols: 40})
call term_sendkeys(buf, "/b")
call VerifyScreenDump(buf, 'Test_smooth_incsearch_1', {})
@@ -795,4 +795,26 @@ func Test_smoothscroll_incsearch()
call StopVimInTerminal(buf)
endfunc
+" Test scrolling multiple lines and stopping at non-zero skipcol.
+func Test_smoothscroll_multi_skipcol()
+ CheckScreendump
+
+ let lines =<< trim END
+ setlocal cursorline scrolloff=0 smoothscroll
+ call setline(1, repeat([''], 9))
+ call setline(3, repeat('a', 50))
+ call setline(8, 'bbb')
+ call setline(9, 'ccc')
+ redraw
+ END
+ call writefile(lines, 'XSmoothMultiSkipcol', 'D')
+ let buf = RunVimInTerminal('-S XSmoothMultiSkipcol', #{rows: 10, cols: 40})
+ call VerifyScreenDump(buf, 'Test_smooth_multi_skipcol_1', {})
+
+ call term_sendkeys(buf, "3\<C-E>")
+ call VerifyScreenDump(buf, 'Test_smooth_multi_skipcol_2', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab