summaryrefslogtreecommitdiff
path: root/src/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-03-06 19:54:13 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-06 19:54:13 +0000
commit127969cf98000a760826ca3a0f3781a8b79522f1 (patch)
tree2d5f5f7f346883705b61aa44d94d3ab3e6b8dc0b /src/testdir/test_diffmode.vim
parentd523c7be5cf39174f3447e8ec498051cea381d27 (diff)
downloadvim-git-8.2.4520.tar.gz
patch 8.2.4520: using wrong highlight for cursor line numberv8.2.4520
Problem: Using wrong highlight for cursor line number. Solution: Take filler lines into account when using CursorLineNr. (closes #9897)
Diffstat (limited to 'src/testdir/test_diffmode.vim')
-rw-r--r--src/testdir/test_diffmode.vim26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index c626023b4..a632b19bc 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -1056,6 +1056,32 @@ func Test_diff_with_cursorline()
call delete('Xtest_diff_cursorline')
endfunc
+func Test_diff_with_cursorline_number()
+ CheckScreendump
+
+ let lines =<< trim END
+ hi CursorLine ctermbg=red ctermfg=white
+ hi CursorLineNr ctermbg=white ctermfg=black cterm=underline
+ set cursorline number
+ call setline(1, ["baz", "foo", "foo", "bar"])
+ 2
+ vnew
+ call setline(1, ["foo", "foo", "bar"])
+ windo diffthis
+ 1wincmd w
+ END
+ call writefile(lines, 'Xtest_diff_cursorline_number')
+ let buf = RunVimInTerminal('-S Xtest_diff_cursorline_number', {})
+
+ call VerifyScreenDump(buf, 'Test_diff_with_cursorline_number_01', {})
+ call term_sendkeys(buf, ":set cursorlineopt=number\r")
+ call VerifyScreenDump(buf, 'Test_diff_with_cursorline_number_02', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_diff_cursorline_number')
+endfunc
+
func Test_diff_with_cursorline_breakindent()
CheckScreendump