0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

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 #3488)
This commit is contained in:
Bram Moolenaar
2018-10-02 18:26:10 +02:00
parent 586c70cdfe
commit 4a5abbd613
7 changed files with 99 additions and 9 deletions

View File

@@ -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