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)
4a5abbd613
This commit is contained in:
Justin M. Keyes
2018-10-04 19:35:04 +02:00
parent 8fd092f3ff
commit ee94eecbd4
4 changed files with 100 additions and 16 deletions

View File

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