summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-10-02 18:26:10 +0200
committerBram Moolenaar <Bram@vim.org>2018-10-02 18:26:10 +0200
commit4a5abbd6138240d109278fe1f0b45489d22f712d (patch)
treeb564a80ec261f5233d5a14446a69425e9d7391c0 /src/testdir/test_diffmode.vim
parent586c70cdfede55a166e3564f1cb68a299d81987d (diff)
patch 8.1.0448: cursorline not removed when using 'cursorbind'v8.1.0448
Problem: Cursorline not removed when using 'cursorbind'. (Justin Keyes) Solution: Store the last cursor line per window. (closes #3488)
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 1deb238735..760440a9b4 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -817,3 +817,29 @@ func Test_diff_screen()
call delete('Xfile2')
endfunc
+func Test_diff_with_cursorline()
+ if !CanRunVimInTerminal()
+ return
+ endif
+
+ call writefile([
+ \ 'hi CursorLine ctermbg=red ctermfg=white',
+ \ 'set cursorline',
+ \ 'call setline(1, ["foo","foo","foo","bar"])',
+ \ 'vnew',
+ \ 'call setline(1, ["bee","foo","foo","baz"])',
+ \ 'windo diffthis',
+ \ '2wincmd w',
+ \ ], 'Xtest_diff_cursorline')
+ let buf = RunVimInTerminal('-S Xtest_diff_cursorline', {})
+
+ call VerifyScreenDump(buf, 'Test_diff_with_cursorline_01', {})
+ call term_sendkeys(buf, "j")
+ call VerifyScreenDump(buf, 'Test_diff_with_cursorline_02', {})
+ call term_sendkeys(buf, "j")
+ call VerifyScreenDump(buf, 'Test_diff_with_cursorline_03', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('Xtest_diff_cursorline')
+endfunc