comparison src/testdir/test_highlight.vim @ 15683:adc6442118b8 v8.1.0849

patch 8.1.0849: cursorline highlight is not always updated commit https://github.com/vim/vim/commit/c07ff5c60ad35982e9cdaa9dd72d3d1669935e87 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 30 21:41:14 2019 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Wed, 30 Jan 2019 21:45:05 +0100
parents 63b02fcf1361
children f362d695bcf9
comparison
equal deleted inserted replaced
15682:e871f9bd86c1 15683:adc6442118b8
1 " Tests for ":highlight" and highlighting. 1 " Tests for ":highlight" and highlighting.
2 2
3 source view_util.vim 3 source view_util.vim
4 source screendump.vim
4 5
5 func Test_highlight() 6 func Test_highlight()
6 " basic test if ":highlight" doesn't crash 7 " basic test if ":highlight" doesn't crash
7 highlight 8 highlight
8 hi Search 9 hi Search
127 call CloseWindow() 128 call CloseWindow()
128 exe hiCursorLine 129 exe hiCursorLine
129 endfunc 130 endfunc
130 131
131 func Test_highlight_eol_with_cursorline_vertsplit() 132 func Test_highlight_eol_with_cursorline_vertsplit()
132 if !has('vertsplit')
133 return
134 endif
135
136 let [hiCursorLine, hi_ul, hi_bg] = HiCursorLine() 133 let [hiCursorLine, hi_ul, hi_bg] = HiCursorLine()
137 134
138 call NewWindow('topleft 5', 5) 135 call NewWindow('topleft 5', 5)
139 call setline(1, 'abcd') 136 call setline(1, 'abcd')
140 call matchadd('Search', '\n') 137 call matchadd('Search', '\n')
531 set t_Co=1 528 set t_Co=1
532 redraw 529 redraw
533 set t_Co=0 530 set t_Co=0
534 redraw 531 redraw
535 endfunc 532 endfunc
533
534 func Test_cursorline_after_yank()
535 if !CanRunVimInTerminal()
536 return
537 endif
538
539 call writefile([
540 \ 'set cul rnu',
541 \ 'call setline(1, ["","1","2","3",""])',
542 \ ], 'Xtest_cursorline_yank')
543 let buf = RunVimInTerminal('-S Xtest_cursorline_yank', {'rows': 8})
544 call term_wait(buf)
545 call term_sendkeys(buf, "Gy3k")
546 call term_wait(buf)
547 call term_sendkeys(buf, "jj")
548
549 call VerifyScreenDump(buf, 'Test_cursorline_yank_01', {})
550
551 " clean up
552 call StopVimInTerminal(buf)
553 call delete('Xtest_cursorline_yank')
554 endfunc