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

patch 8.2.1957: diff and cursorcolumn highlighting don't mix

Problem:    Diff and cursorcolumn highlighting don't mix.
Solution:   Fix condition for what attribute to use. (Christian Brabandt,
            closes #7258, closes #7260)
This commit is contained in:
Bram Moolenaar
2020-11-05 19:07:21 +01:00
parent b4d16cb11d
commit fabc3ca896
7 changed files with 121 additions and 1 deletions

View File

@@ -1150,4 +1150,37 @@ func Test_diff_and_scroll()
set ls&
endfunc
func Test_diff_filler_cursorcolumn()
CheckScreendump
let content =<< trim END
call setline(1, ['aa', 'bb', 'cc'])
vnew
call setline(1, ['aa', 'cc'])
windo diffthis
wincmd p
setlocal cursorcolumn foldcolumn=0
norm! gg0
redraw!
END
call writefile(content, 'Xtest_diff_cuc')
let buf = RunVimInTerminal('-S Xtest_diff_cuc', {})
call VerifyScreenDump(buf, 'Test_diff_cuc_01', {})
call term_sendkeys(buf, "l")
call term_sendkeys(buf, "\<C-l>")
call VerifyScreenDump(buf, 'Test_diff_cuc_02', {})
call term_sendkeys(buf, "0j")
call term_sendkeys(buf, "\<C-l>")
call VerifyScreenDump(buf, 'Test_diff_cuc_03', {})
call term_sendkeys(buf, "l")
call term_sendkeys(buf, "\<C-l>")
call VerifyScreenDump(buf, 'Test_diff_cuc_04', {})
" clean up
call StopVimInTerminal(buf)
call delete('Xtest_diff_cuc')
endfunc
" vim: shiftwidth=2 sts=2 expandtab