0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.4.422

Problem:    When using conceal with linebreak some text is not displayed
            correctly. (Grüner Gimpel)
Solution:   Check for conceal mode when using linebreak. (Christian Brabandt)
This commit is contained in:
Bram Moolenaar 2014-08-29 12:08:43 +02:00
parent 2d46e6075b
commit 49f9dd7b91
4 changed files with 30 additions and 0 deletions

View File

@ -4514,6 +4514,11 @@ win_line(wp, lnum, startrow, endrow, nochange)
int i;
int saved_nextra = n_extra;
#ifdef FEAT_CONCEAL
if (is_concealing && vcol_off > 0)
/* there are characters to conceal */
tab_len += vcol_off;
#endif
/* if n_extra > 0, it gives the number of chars, to
* use for a tab, else we need to calculate the width
* for a tab */
@ -4539,6 +4544,12 @@ win_line(wp, lnum, startrow, endrow, nochange)
#endif
}
p_extra = p_extra_free;
#ifdef FEAT_CONCEAL
/* n_extra will be increased by FIX_FOX_BOGUSCOLS
* macro below, so need to adjust for that here */
if (is_concealing && vcol_off > 0)
n_extra -= vcol_off;
#endif
}
#endif
#ifdef FEAT_CONCEAL

View File

@ -46,6 +46,16 @@ STARTTEST
:redraw!
:let line=ScreenChar(winwidth(0))
:call DoRecordScreen()
:let line="_S_\t bla"
:$put =line
:$
:norm! zt
:let g:test ="Test 5: set linebreak with conceal and set list and tab displayed by different char (line may not be truncated)"
:set cpo&vim list linebreak conceallevel=2 concealcursor=nv listchars=tab:ab
:syn match ConcealVar contained /_/ conceal
:syn match All /.*/ contains=ConcealVar
:let line=ScreenChar(winwidth(0))
:call DoRecordScreen()
:%w! test.out
:qa!
ENDTEST

View File

@ -25,3 +25,10 @@ Test 4: set linebreak with tab and 1 line as long as screen: should break!
+aaaaaaaaaaaaaaaaaa
~
~
_S_ bla
Test 5: set linebreak with conceal and set list and tab displayed by different char (line may not be truncated)
Sabbbbbb bla
~
~
~

View File

@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
422,
/**/
421,
/**/