mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 9.1.0129: Fix truncation of text_wrap 'wrap' virt text after EOL list char
Problem: Virtual text with text_wrap 'wrap' was effectively being truncated by a break conditional on the EOL list character being added to the screen line. (BigPeet) Solution: Remove the condition that was leading to the early break and instead fix a similar but incorrectly written outer condition that checks if there is more to add at the end of the screen line. (Dylan Thacker-Smith) Also, related: - update comment in win_line() - remove no longer necessary at_end_str variable in win_line() fixes: #12725 closes: #14079 Co-authored-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a35235e824
commit
f548ae7b63
@@ -1121,8 +1121,6 @@ win_line(
|
|||||||
#if defined(FEAT_LINEBREAK) && defined(FEAT_PROP_POPUP)
|
#if defined(FEAT_LINEBREAK) && defined(FEAT_PROP_POPUP)
|
||||||
int in_linebreak = FALSE; // n_extra set for showing linebreak
|
int in_linebreak = FALSE; // n_extra set for showing linebreak
|
||||||
#endif
|
#endif
|
||||||
static char_u *at_end_str = (char_u *)""; // used for p_extra when
|
|
||||||
// displaying eol at end-of-line
|
|
||||||
int lcs_eol_one = wp->w_lcs_chars.eol; // eol until it's been used
|
int lcs_eol_one = wp->w_lcs_chars.eol; // eol until it's been used
|
||||||
int lcs_prec_todo = wp->w_lcs_chars.prec;
|
int lcs_prec_todo = wp->w_lcs_chars.prec;
|
||||||
// prec until it's been used
|
// prec until it's been used
|
||||||
@@ -3304,7 +3302,7 @@ win_line(
|
|||||||
if (!(area_highlighting && virtual_active()
|
if (!(area_highlighting && virtual_active()
|
||||||
&& wlv.tocol != MAXCOL
|
&& wlv.tocol != MAXCOL
|
||||||
&& wlv.vcol < wlv.tocol))
|
&& wlv.vcol < wlv.tocol))
|
||||||
wlv.p_extra = at_end_str;
|
wlv.p_extra = (char_u *)"";
|
||||||
wlv.n_extra = 0;
|
wlv.n_extra = 0;
|
||||||
}
|
}
|
||||||
if (wp->w_p_list && wp->w_lcs_chars.eol > 0)
|
if (wp->w_p_list && wp->w_lcs_chars.eol > 0)
|
||||||
@@ -4116,7 +4114,7 @@ win_line(
|
|||||||
|| text_prop_next <= last_textprop_text_idx
|
|| text_prop_next <= last_textprop_text_idx
|
||||||
#endif
|
#endif
|
||||||
|| (wp->w_p_list && wp->w_lcs_chars.eol != NUL
|
|| (wp->w_p_list && wp->w_lcs_chars.eol != NUL
|
||||||
&& wlv.p_extra != at_end_str)
|
&& lcs_eol_one != -1)
|
||||||
|| (wlv.n_extra != 0 && (wlv.c_extra != NUL
|
|| (wlv.n_extra != 0 && (wlv.c_extra != NUL
|
||||||
|| *wlv.p_extra != NUL)))
|
|| *wlv.p_extra != NUL)))
|
||||||
)
|
)
|
||||||
@@ -4133,18 +4131,14 @@ win_line(
|
|||||||
++wlv.row;
|
++wlv.row;
|
||||||
++wlv.screen_row;
|
++wlv.screen_row;
|
||||||
|
|
||||||
// When not wrapping and finished diff lines, or when displayed
|
// When not wrapping and finished diff lines, break here.
|
||||||
// '$' and highlighting until last column, break here.
|
if (!wp->w_p_wrap
|
||||||
if (((!wp->w_p_wrap
|
|
||||||
#ifdef FEAT_DIFF
|
#ifdef FEAT_DIFF
|
||||||
&& wlv.filler_todo <= 0
|
&& wlv.filler_todo <= 0
|
||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_PROP_POPUP
|
#ifdef FEAT_PROP_POPUP
|
||||||
&& !text_prop_above
|
&& !text_prop_above
|
||||||
#endif
|
&& !text_prop_follows
|
||||||
) || lcs_eol_one == -1)
|
|
||||||
#ifdef FEAT_PROP_POPUP
|
|
||||||
&& !text_prop_follows
|
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
break;
|
break;
|
||||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
129,
|
||||||
/**/
|
/**/
|
||||||
128,
|
128,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user