diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-03-28 05:10:15 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-03-28 06:15:26 +0800 |
commit | ab02b28b4e14ecd22facab9377ea71aff2ffdfdb (patch) | |
tree | 8c8c262404a9888c3acebd48272d0f31840a07a6 /src | |
parent | 4baeb96c1bb66c845b4bc58482df4e601485eec3 (diff) | |
download | rneovim-ab02b28b4e14ecd22facab9377ea71aff2ffdfdb.tar.gz rneovim-ab02b28b4e14ecd22facab9377ea71aff2ffdfdb.tar.bz2 rneovim-ab02b28b4e14ecd22facab9377ea71aff2ffdfdb.zip |
vim-patch:8.2.4630: 'cursorline' not always updated with 'culopt' is "screenline"
Problem: 'cursorline' not always updated with 'cursorlineopt' is
"screenline".
Solution: Call check_redraw_cursorline() more often. (closes vim/vim#10013)
https://github.com/vim/vim/commit/bf269ed0b0bd8414eea7bea17465b2738a9a2b55
Code was reverted in patch 8.2.4638, so this just ports the test.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_cursorline.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cursorline.vim b/src/nvim/testdir/test_cursorline.vim index bf049ec779..7e97df6027 100644 --- a/src/nvim/testdir/test_cursorline.vim +++ b/src/nvim/testdir/test_cursorline.vim @@ -293,5 +293,26 @@ func Test_cursorline_callback() call delete('Xcul_timer') endfunc +func Test_cursorline_screenline_update() + CheckScreendump + + let lines =<< trim END + call setline(1, repeat('xyz ', 30)) + set cursorline cursorlineopt=screenline + inoremap <F2> <Cmd>call cursor(1, 1)<CR> + END + call writefile(lines, 'Xcul_screenline') + + let buf = RunVimInTerminal('-S Xcul_screenline', #{rows: 8}) + call term_sendkeys(buf, "A") + call VerifyScreenDump(buf, 'Test_cursorline_screenline_1', {}) + call term_sendkeys(buf, "\<F2>") + call VerifyScreenDump(buf, 'Test_cursorline_screenline_2', {}) + call term_sendkeys(buf, "\<Esc>") + + call StopVimInTerminal(buf) + call delete('Xcul_screenline') +endfunc + " vim: shiftwidth=2 sts=2 expandtab |