Mercurial > vim
diff src/testdir/test_diffmode.vim @ 14873:a8ed1cb85859 v8.1.0448
patch 8.1.0448: cursorline not removed when using 'cursorbind'
commit https://github.com/vim/vim/commit/4a5abbd6138240d109278fe1f0b45489d22f712d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Oct 2 18:26:10 2018 +0200
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 https://github.com/vim/vim/issues/3488)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 02 Oct 2018 18:30:06 +0200 |
parents | 27055ad9276b |
children | 291656f731c9 |
line wrap: on
line diff
--- 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