// into "ScreenLines".
if (c == TAB && (!wp->w_p_list || wp->w_lcs_chars.tab1))
{
- int tab_len = 0;
- long vcol_adjusted = wlv.vcol; // removed showbreak length
+ int tab_len = 0;
+ long vcol_adjusted = wlv.vcol; // removed showbreak len
#ifdef FEAT_LINEBREAK
- char_u *sbr = get_showbreak_value(wp);
+ char_u *sbr = get_showbreak_value(wp);
// only adjust the tab_len, when at the first column
// after the showbreak value was drawn
#ifdef FEAT_LINEBREAK
if (!wp->w_p_lbr || !wp->w_p_list)
#endif
+ {
// tab amount depends on current column
wlv.n_extra = tab_len;
+ }
#ifdef FEAT_LINEBREAK
else
{
# endif
if (tab_len > 0)
{
- // If wlv.n_extra > 0, it gives the number of
- // chars, to use for a tab, else we need to
- // calculate the width for a tab.
+ // If wlv.n_extra > 0, it gives the number of chars
+ // to use for a tab, else we need to calculate the
+ // width for a tab.
int tab2_len = mb_char2len(wp->w_lcs_chars.tab2);
len = tab_len * tab2_len;
if (wp->w_lcs_chars.tab3)
? wp->w_lcs_chars.tab3
: wp->w_lcs_chars.tab1;
#ifdef FEAT_LINEBREAK
- if (wp->w_p_lbr)
+ if (wp->w_p_lbr && wlv.p_extra != NULL)
wlv.c_extra = NUL; // using p_extra from above
else
#endif
bwipeout!
endfunc
+func Test_linebreak_list()
+ " This was setting wlv.c_extra to NUL while wlv.p_extra is NULL
+ filetype plugin on
+ syntax enable
+ edit! $VIMRUNTIME/doc/index.txt
+ /v_P
+
+ setlocal list
+ setlocal listchars=tab:>-
+ setlocal linebreak
+ setlocal nowrap
+ setlocal filetype=help
+ redraw!
+
+ bwipe!
+endfunc
+
+
" vim: shiftwidth=2 sts=2 expandtab