mirror of
https://github.com/neovim/neovim.git
synced 2025-10-01 07:28:34 +00:00
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#1567986dc4f8b43
(cherry picked from commit90585e47fe
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
e464b8c90d
commit
b4824edac1
@@ -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()
|
||||
|
Reference in New Issue
Block a user