summaryrefslogtreecommitdiff
path: root/src/testdir/test_highlight.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/testdir/test_highlight.vim')
-rw-r--r--src/testdir/test_highlight.vim20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_highlight.vim b/src/testdir/test_highlight.vim
index 3d640bbe8..27d7641e4 100644
--- a/src/testdir/test_highlight.vim
+++ b/src/testdir/test_highlight.vim
@@ -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