From 794981d9bed7048fb3ee1ada38fcf1ebdace4c53 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 29 Aug 2023 09:36:55 +0800 Subject: vim-patch:9.0.1813: linebreak incorrect drawn with breakindent (#24917) Problem: 'linebreak' is incorrectly drawn after 'breakindent'. Solution: Don't include 'breakindent' size when already after it. closes: vim/vim#12937 closes: vim/vim#12940 https://github.com/vim/vim/commit/1d3e0e8f3110a7807431eae056914ccea57b057b --- test/old/testdir/test_display.vim | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/old/testdir/test_display.vim b/test/old/testdir/test_display.vim index b08d093a2a..a0bbf34df2 100644 --- a/test/old/testdir/test_display.vim +++ b/test/old/testdir/test_display.vim @@ -420,12 +420,19 @@ func Test_display_linebreak_breakat() new vert resize 25 let _breakat = &breakat - setl signcolumn=yes linebreak breakat=) showbreak=+\ + setl signcolumn=yes linebreak breakat=) showbreak=++ call setline(1, repeat('x', winwidth(0) - 2) .. ')abc') let lines = ScreenLines([1, 2], 25) let expected = [ \ ' xxxxxxxxxxxxxxxxxxxxxxx', - \ ' + )abc ' + \ ' ++)abc ', + \ ] + call assert_equal(expected, lines) + setl breakindent breakindentopt=shift:2 + let lines = ScreenLines([1, 2], 25) + let expected = [ + \ ' xxxxxxxxxxxxxxxxxxxxxxx', + \ ' ++)abc ', \ ] call assert_equal(expected, lines) %bw! -- cgit