diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-12-06 07:16:02 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-06 07:16:02 +0800 |
| commit | 06ff540e1ca25f4c26670f184d4087f6e3188064 (patch) | |
| tree | 826174abd65921075280bb365a7a66541b976de4 /test/old/testdir | |
| parent | 4a1abc91a0ec71f85239dbaf0ffa1fe42c50e368 (diff) | |
| download | rneovim-06ff540e1ca25f4c26670f184d4087f6e3188064.tar.gz rneovim-06ff540e1ca25f4c26670f184d4087f6e3188064.tar.bz2 rneovim-06ff540e1ca25f4c26670f184d4087f6e3188064.zip | |
vim-patch:9.0.2151: 'breakindent' is not drawn after diff filler lines (#26412)
Problem: 'breakindent' is not drawn after diff filler lines.
Solution: Correct check for whether 'breakindent' should be drawn.
closes: vim/vim#13624
https://github.com/vim/vim/commit/588f20decebebedba3ad733f4f443a597e9747c3
Cherry-pick Test_diff_with_syntax() change from patch 9.0.1257.
Diffstat (limited to 'test/old/testdir')
| -rw-r--r-- | test/old/testdir/test_diffmode.vim | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/test/old/testdir/test_diffmode.vim b/test/old/testdir/test_diffmode.vim index fd94f4a7b2..89a38bcf51 100644 --- a/test/old/testdir/test_diffmode.vim +++ b/test/old/testdir/test_diffmode.vim @@ -1083,18 +1083,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") @@ -1110,11 +1111,30 @@ func Test_diff_with_cursorline_breakindent() 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 let lines =<< trim END - void doNothing() { + void doNothing() { int x = 0; char *s = "hello"; return 5; @@ -1122,7 +1142,7 @@ func Test_diff_with_syntax() END call writefile(lines, 'Xprogram1.c', 'D') let lines =<< trim END - void doSomething() { + void doSomething() { int x = 0; char *s = "there"; return 5; @@ -1131,7 +1151,7 @@ func Test_diff_with_syntax() call writefile(lines, 'Xprogram2.c', 'D') let lines =<< trim END - edit Xprogram1.c + edit Xprogram1.c diffsplit Xprogram2.c END call writefile(lines, 'Xtest_diff_syntax', 'D') |