aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-10-04 19:35:04 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-10-16 00:15:09 +0200
commitee94eecbd4ce9ec3b4371bbe1a2b3cc24cf315d4 (patch)
tree24237923bdbb093dee5d3454e27c37de8b0c303e /src/nvim/testdir/test_diffmode.vim
parent8fd092f3ff15bf70f84ec0d716c5aaa2c7379fa1 (diff)
downloadrneovim-ee94eecbd4ce9ec3b4371bbe1a2b3cc24cf315d4.tar.gz
rneovim-ee94eecbd4ce9ec3b4371bbe1a2b3cc24cf315d4.tar.bz2
rneovim-ee94eecbd4ce9ec3b4371bbe1a2b3cc24cf315d4.zip
vim-patch:8.1.0448: cursorline not removed when using 'cursorbind'
Problem: Cursorline not removed when using 'cursorbind'. (Justin Keyes) Solution: Store the last cursor line per window. (closes vim/vim#3488) https://github.com/vim/vim/commit/4a5abbd6138240d109278fe1f0b45489d22f712d
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
-rw-r--r--src/nvim/testdir/test_diffmode.vim27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim
index 90fd34d93e..afe289b262 100644
--- a/src/nvim/testdir/test_diffmode.vim
+++ b/src/nvim/testdir/test_diffmode.vim
@@ -588,3 +588,30 @@ func Test_diff_lastline()
bwipe!
bwipe!
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