aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-09-14 19:20:56 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-09-14 19:29:37 +0800
commit90585e47feb7b4c4d878ad32480e2fc09744a7ed (patch)
treedb06a5c5dd5c204d0be4b4b331a9aca4ad716915 /test/old/testdir
parentf2173b1aa2bec63aa982794ffde806090ab5b680 (diff)
downloadrneovim-90585e47feb7b4c4d878ad32480e2fc09744a7ed.tar.gz
rneovim-90585e47feb7b4c4d878ad32480e2fc09744a7ed.tar.bz2
rneovim-90585e47feb7b4c4d878ad32480e2fc09744a7ed.zip
vim-patch:9.1.0729: Wrong cursor-screenline when resizing window
Problem: Wrong cursor-screenline when resizing window Solution: Invalidate saved left_col and right_col when width1 or width2 change. closes: vim/vim#15679 https://github.com/vim/vim/commit/86dc4f8b432233a01d022c3e71df53db58229713
Diffstat (limited to 'test/old/testdir')
-rw-r--r--test/old/testdir/test_cursorline.vim24
1 files changed, 22 insertions, 2 deletions
diff --git a/test/old/testdir/test_cursorline.vim b/test/old/testdir/test_cursorline.vim
index 99a812b1de..d9c77c0b36 100644
--- a/test/old/testdir/test_cursorline.vim
+++ b/test/old/testdir/test_cursorline.vim
@@ -262,14 +262,34 @@ func Test_cursorline_callback()
call timer_start(300, 'Func')
END
- call writefile(lines, 'Xcul_timer')
+ call writefile(lines, 'Xcul_timer', 'D')
let buf = RunVimInTerminal('-S Xcul_timer', #{rows: 8})
call TermWait(buf, 310)
call VerifyScreenDump(buf, 'Test_cursorline_callback_1', {})
call StopVimInTerminal(buf)
- call delete('Xcul_timer')
+endfunc
+
+func Test_cursorline_screenline_resize()
+ CheckScreendump
+
+ let lines =<< trim END
+ 50vnew
+ call setline(1, repeat('xyz ', 30))
+ setlocal number cursorline cursorlineopt=screenline
+ normal! $
+ END
+ call writefile(lines, 'Xcul_screenline_resize', 'D')
+
+ let buf = RunVimInTerminal('-S Xcul_screenline_resize', #{rows: 8})
+ call VerifyScreenDump(buf, 'Test_cursorline_screenline_resize_1', {})
+ call term_sendkeys(buf, ":vertical resize -4\<CR>")
+ call VerifyScreenDump(buf, 'Test_cursorline_screenline_resize_2', {})
+ call term_sendkeys(buf, ":set cpoptions+=n\<CR>")
+ call VerifyScreenDump(buf, 'Test_cursorline_screenline_resize_3', {})
+
+ call StopVimInTerminal(buf)
endfunc
func Test_cursorline_screenline_update()