// Update the cursor position to be able to compute the popup menu
// position. The cursor line length may have changed because of the
// inserted completion.
- curwin->w_valid &= VALID_CROW|VALID_CHEIGHT;
+ curwin->w_valid &= ~(VALID_CROW|VALID_CHEIGHT);
validate_cursor();
}
--- /dev/null
+| +0#af5f00255#ffffff0@1|3| | +0#0000000&@70
+| +0#af5f00255&@1|2| |1+0#0000000&| @69
+| +0#af5f00255&@1|1| |2+0#0000000&| @69
+| +0#af5f00255&@1|0| >3+8#0000000&| @69
+| +0#af5f00255&@1|1| | +0#0000000&@70
+|~+0#4040ff13&| @73
+|~| @73
+|4+0#0000000&| |l|i|n|e|s| |y|a|n|k|e|d| @42|4|,|1| @10|A|l@1|
" Tests for ":highlight" and highlighting.
source view_util.vim
+source screendump.vim
func Test_highlight()
" basic test if ":highlight" doesn't crash
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)
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