From e9dd640897e6a318d770be62bbcc9f417f95990e Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 16 Aug 2021 15:27:04 +0800 Subject: vim-patch:8.2.3295: 'cursorline' should not apply to 'breakindent' #15281 Problem: 'cursorline' should not apply to 'breakindent'. Solution: Make 'cursorline' apply to 'breakindent' and 'showbreak' consistently. (closes vim/vim#8684) https://github.com/vim/vim/commit/4f33bc20d7d5444e44d13f954e8219ad1abd26ef --- src/nvim/testdir/test_diffmode.vim | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'src/nvim/testdir/test_diffmode.vim') diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index 8592f48af7..5c9c1ce884 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -990,6 +990,37 @@ func Test_diff_with_cursorline() call delete('Xtest_diff_cursorline') endfunc +func Test_diff_with_cursorline_breakindent() + CheckScreendump + + call writefile([ + \ 'hi CursorLine ctermbg=red ctermfg=white', + \ 'set noequalalways wrap diffopt=followwrap cursorline breakindent', + \ '50vnew', + \ 'call setline(1, [" "," "," "," "])', + \ 'exe "norm 20Afoo\j20Afoo\j20Afoo\j20Abar\"', + \ 'vnew', + \ 'call setline(1, [" "," "," "," "])', + \ 'exe "norm 20Abee\j20Afoo\j20Afoo\j20Abaz\"', + \ 'windo diffthis', + \ '2wincmd w', + \ ], 'Xtest_diff_cursorline_breakindent') + let buf = RunVimInTerminal('-S Xtest_diff_cursorline_breakindent', {}) + + call term_sendkeys(buf, "gg0") + call VerifyScreenDump(buf, 'Test_diff_with_cul_bri_01', {}) + call term_sendkeys(buf, "j") + call VerifyScreenDump(buf, 'Test_diff_with_cul_bri_02', {}) + call term_sendkeys(buf, "j") + call VerifyScreenDump(buf, 'Test_diff_with_cul_bri_03', {}) + call term_sendkeys(buf, "j") + call VerifyScreenDump(buf, 'Test_diff_with_cul_bri_04', {}) + + " clean up + call StopVimInTerminal(buf) + call delete('Xtest_diff_cursorline_breakindent') +endfunc + func Test_diff_with_syntax() CheckScreendump -- cgit