summaryrefslogtreecommitdiff
path: root/src/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2021-08-05 17:57:02 +0200
committerBram Moolenaar <Bram@vim.org>2021-08-05 17:57:02 +0200
commit4f33bc20d7d5444e44d13f954e8219ad1abd26ef (patch)
treec207d3fc1e3253cc40cc15dc3d2e2fa325d56db1 /src/testdir/test_diffmode.vim
parent1b6acf02b7e685ecb87ccba52c91835a7519073e (diff)
downloadvim-git-4f33bc20d7d5444e44d13f954e8219ad1abd26ef.tar.gz
patch 8.2.3295: 'cursorline' should not apply to 'breakindent'v8.2.3295
Problem: 'cursorline' should not apply to 'breakindent'. Solution: Make 'cursorline' apply to 'breakindent' and 'showbreak' consistently. (closes #8684)
Diffstat (limited to 'src/testdir/test_diffmode.vim')
-rw-r--r--src/testdir/test_diffmode.vim31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index 4a54f8c84..5400de6d3 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -1018,6 +1018,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\<Esc>j20Afoo\<Esc>j20Afoo\<Esc>j20Abar\<Esc>"',
+ \ 'vnew',
+ \ 'call setline(1, [" "," "," "," "])',
+ \ 'exe "norm 20Abee\<Esc>j20Afoo\<Esc>j20Afoo\<Esc>j20Abaz\<Esc>"',
+ \ '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