Mercurial > vim
diff src/testdir/test_diffmode.vim @ 33884:3d0544e31ca5 v9.0.2151
patch 9.0.2151: 'breakindent' is not drawn after diff filler lines
Commit: https://github.com/vim/vim/commit/588f20decebebedba3ad733f4f443a597e9747c3
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Dec 5 15:47:09 2023 +0100
patch 9.0.2151: 'breakindent' is not drawn after diff filler lines
Problem: 'breakindent' is not drawn after diff filler lines.
Solution: Correct check for whether 'breakindent' should be drawn.
closes: #13624
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 10 Dec 2023 15:16:21 +0100 |
parents | b91aeab2d62e |
children | 70c1a9c6f41d |
line wrap: on
line diff
--- a/src/testdir/test_diffmode.vim +++ b/src/testdir/test_diffmode.vim @@ -1097,18 +1097,19 @@ 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', 'D') + let lines =<< trim END + 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 + END + call writefile(lines, 'Xtest_diff_cursorline_breakindent', 'D') let buf = RunVimInTerminal('-S Xtest_diff_cursorline_breakindent', {}) call term_sendkeys(buf, "gg0") @@ -1124,6 +1125,25 @@ func Test_diff_with_cursorline_breakinde call StopVimInTerminal(buf) endfunc +func Test_diff_breakindent_after_filler() + CheckScreendump + + let lines =<< trim END + set laststatus=0 diffopt+=followwrap breakindent + call setline(1, ['a', ' ' .. repeat('c', 50)]) + vnew + call setline(1, ['a', 'b', ' ' .. repeat('c', 50)]) + windo diffthis + norm! G$ + END + call writefile(lines, 'Xtest_diff_breakindent_after_filler', 'D') + let buf = RunVimInTerminal('-S Xtest_diff_breakindent_after_filler', #{rows: 8, cols: 45}) + call VerifyScreenDump(buf, 'Test_diff_breakindent_after_filler', {}) + + " clean up + call StopVimInTerminal(buf) +endfunc + func Test_diff_with_syntax() CheckScreendump