diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-03-19 12:24:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-19 12:24:41 +0100 |
| commit | 6f7b81bd6d555a52ec310c45990a9c4caf84166f (patch) | |
| tree | 68aa052ee52b70efa01967a040099bd8443844b1 /src/nvim/testdir | |
| parent | ad3b312cf5fd78fd72c5d3aa24257bd2a3c76496 (diff) | |
| download | rneovim-6f7b81bd6d555a52ec310c45990a9c4caf84166f.tar.gz rneovim-6f7b81bd6d555a52ec310c45990a9c4caf84166f.tar.bz2 rneovim-6f7b81bd6d555a52ec310c45990a9c4caf84166f.zip | |
vim-patch:8.1.{0849,1001}: 'cursorline' highlight #9757
- Lua test correctly fails when 8.1.0849 is reverted.
- 8.1.1001 bug does not manifest in Neovim.
vim-patch:8.1.0849: cursorline highlight is not always updated
Problem: Cursorline highlight is not always updated.
Solution: Set w_last_cursorline when redrawing. Fix resetting cursor flags
when using the popup menu.
https://github.com/vim/vim/commit/c07ff5c60ad35982e9cdaa9dd72d3d1669935e87
vim-patch:8.1.1001: Visual area not correct when using 'cursorline'
Problem: Visual area not correct when using 'cursorline'.
Solution: Update w_last_cursorline also in Visual mode. (Hirohito Higashi,
closes vim/vim#4086)
https://github.com/vim/vim/commit/8156ed37558231a8167a1a61a147713d84c9af59
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_highlight.vim | 46 |
1 files changed, 42 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_highlight.vim b/src/nvim/testdir/test_highlight.vim index 33df79581c..e751fb5d16 100644 --- a/src/nvim/testdir/test_highlight.vim +++ b/src/nvim/testdir/test_highlight.vim @@ -129,10 +129,6 @@ func Test_highlight_eol_with_cursorline() endfunc func Test_highlight_eol_with_cursorline_vertsplit() - if !has('vertsplit') - return - endif - let [hiCursorLine, hi_ul, hi_bg] = HiCursorLine() call NewWindow('topleft 5', 5) @@ -533,3 +529,45 @@ func Test_termguicolors() set t_Co=0 redraw endfunc + +func Test_cursorline_after_yank() + if !CanRunVimInTerminal() + return + endif + + call writefile([ + \ 'set cul rnu', + \ 'call setline(1, ["","1","2","3",""])', + \ ], 'Xtest_cursorline_yank') + let buf = RunVimInTerminal('-S Xtest_cursorline_yank', {'rows': 8}) + call term_wait(buf) + call term_sendkeys(buf, "Gy3k") + call term_wait(buf) + call term_sendkeys(buf, "jj") + + call VerifyScreenDump(buf, 'Test_cursorline_yank_01', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('Xtest_cursorline_yank') +endfunc + +func Test_cursorline_with_visualmode() + if !CanRunVimInTerminal() + return + endif + + call writefile([ + \ 'set cul', + \ 'call setline(1, repeat(["abc"], 50))', + \ ], 'Xtest_cursorline_with_visualmode') + let buf = RunVimInTerminal('-S Xtest_cursorline_with_visualmode', {'rows': 12}) + call term_wait(buf) + call term_sendkeys(buf, "V\<C-f>kkkjk") + + call VerifyScreenDump(buf, 'Test_cursorline_with_visualmode_01', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('Xtest_cursorline_with_visualmode') +endfunc |