]> granicus.if.org Git - vim/commitdiff
patch 8.1.2007: no test for what 8.1.1926 fixes v8.1.2007
authorBram Moolenaar <Bram@vim.org>
Sun, 8 Sep 2019 12:07:47 +0000 (14:07 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 8 Sep 2019 12:07:47 +0000 (14:07 +0200)
Problem:    No test for what 8.1.1926 fixes.
Solution:   Add a test case.

src/testdir/test_highlight.vim
src/version.c

index 3d640bbe83d5aa9dd0f666abebc9c8d4eb0e3c56..27d7641e44a9e9e1ebec84ea3b37d5e903ef9640 100644 (file)
@@ -552,6 +552,26 @@ func Test_cursorline_after_yank()
   call delete('Xtest_cursorline_yank')
 endfunc
 
+" test for issue #4862
+func Test_put_before_cursorline()
+  new
+  only!
+  call setline(1, 'A')
+  redraw
+  let std_attr = screenattr(1, 1)
+  set cursorline
+  redraw
+  let cul_attr = screenattr(1, 1)
+  normal yyP
+  redraw
+  " Line 1 has cursor so it should be highlighted with CursorLine.
+  call assert_equal(cul_attr, screenattr(1, 1))
+  " And CursorLine highlighting from the second line should be gone.
+  call assert_equal(std_attr, screenattr(2, 1))
+  set nocursorline
+  bwipe!
+endfunc
+
 func Test_cursorline_with_visualmode()
   CheckScreendump
 
index 4f9e3462a437f85fd307c73c2abef863c77a4177..f0fe0591f526122c8bcb7b52bd8dd1f60bd0f54c 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2007,
 /**/
     2006,
 /**/