diff 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
line wrap: on
line diff
--- a/src/testdir/test_highlight.vim
+++ b/src/testdir/test_highlight.vim
@@ -1,6 +1,7 @@
 " Tests for ":highlight" and highlighting.
 
 source view_util.vim
+source screendump.vim
 
 func Test_highlight()
   " basic test if ":highlight" doesn't crash
@@ -129,10 +130,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 +530,25 @@ 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