Hi Christian!
On 2014-10-27 Monday at 20:58 +0100 Christian Brabandt wrote: > On So, 26 Okt 2014, Roland Eggner wrote: > > > When options breakindent, wrap and vartabstop are used all together, > > there are erroneous indentation offsets of continuation lines, as if > > breakindentopt=shift:N would specify nonzero values of N depending on > > number of tab characters at start of line, even if vartabstop is set > > to a single number, e.g. “set vartabstop=4”. > > Is there a simple way to reproduce the issue? Sounds like we should add > a test for that. Attached. Sorry for beeing lazy and just reusing existing testfiles -- my bandwidth for vim issues is limited currently. > Macht den Reichtum billiger! +1 ;) -- Roland Eggner
# HG changeset patch # Parent 5078278f62338043b21afdf63aa020009be9babb # User Roland Eggner < [email protected] s/o/e/g > # Date 1414488396 -3600 src/testdir/test_vartabstop_breakindent.{in,ok} Just reusing test_breakindent with “s|\bts\b|vartabstop|“ applied. Thoughts: src/misc1.c:633:get_breakindent_win(wp, line) refers only to “b_p_ts”, why not additionally to “b_p_vts” or “b_p_vts_ary”? Todo: (a) Test fails with vim-7.4.488. (b) Purge superfluous duplications of test_breakindent. diff --git a/src/testdir/test_breakindent.in b/src/testdir/test_vartabstop_breakindent.in copy from src/testdir/test_breakindent.in copy to src/testdir/test_vartabstop_breakindent.in --- a/src/testdir/test_breakindent.in +++ b/src/testdir/test_vartabstop_breakindent.in @@ -5,7 +5,7 @@ STARTTEST :if !exists("+breakindent") | e! test.ok | w! test.out | qa! | endif :10new|:vsp|:vert resize 20 :put =\"\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP\" -:set ts=4 sw=4 sts=4 breakindent +:set vartabstop=4 sw=4 sts=4 breakindent :fu! ScreenChar(width) : let c='' : for i in range(1,a:width) @@ -69,7 +69,7 @@ STARTTEST :call DoRecordScreen() :wincmd p :let g:test="\n Test 11: strdisplaywidth when breakindent is on" -:set cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4 +:set cpo-=n sbr=>> nu nuw=4 nolist briopt= vartabstop=4 :let text=getline(2) "skip leading tab when calculating text width :let width = strlen(text[1:])+indent(2)*4+strlen(&sbr)*3 " text wraps 3 times :$put =g:test diff --git a/src/testdir/test_breakindent.ok b/src/testdir/test_vartabstop_breakindent.ok copy from src/testdir/test_breakindent.ok copy to src/testdir/test_vartabstop_breakindent.ok
pgp2PhVvSB3Io.pgp
Description: PGP signature
