0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.1783: Display issues with virt text smoothscroll and showbreak

Problem:  Wrong display with wrapping virtual text or unprintable chars,
          'showbreak' and 'smoothscroll'.
Solution: Don't skip cells taken by 'showbreak' in screen lines before
          "w_skipcol". Combined "n_skip" and "skip_cells".

closes: #12597

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
zeertzjq
2023-08-22 22:07:34 +02:00
committed by Christian Brabandt
parent 171c5b9b03
commit b557f48982
40 changed files with 536 additions and 89 deletions

View File

@@ -1097,9 +1097,14 @@ lbr_chartabsize_adv(chartabsize_T *cts)
* inserts text. * inserts text.
* This function is used very often, keep it fast!!!! * This function is used very often, keep it fast!!!!
* *
* If "headp" not NULL, set *headp to the size of what we for 'showbreak' * If "headp" not NULL, set "*headp" to the size of 'showbreak'/'breakindent'
* string at start of line. Warning: *headp is only set if it's a non-zero * included in the return value.
* value, init to 0 before calling. * When "cts->cts_max_head_vcol" is positive, only count in "*headp" the size
* of 'showbreak'/'breakindent' before "cts->cts_max_head_vcol".
* When "cts->cts_max_head_vcol" is negative, only count in "*headp" the size
* of 'showbreak'/'breakindent' before where cursor should be placed.
*
* Warning: "*headp" may not be set if it's 0, init to 0 before calling.
*/ */
int int
win_lbr_chartabsize( win_lbr_chartabsize(
@@ -1118,9 +1123,7 @@ win_lbr_chartabsize(
colnr_T col2; colnr_T col2;
colnr_T col_adj = 0; // vcol + screen size of tab colnr_T col_adj = 0; // vcol + screen size of tab
colnr_T colmax; colnr_T colmax;
int added;
int mb_added = 0; int mb_added = 0;
int numberextra;
char_u *ps; char_u *ps;
int tab_corr = (*s == TAB); int tab_corr = (*s == TAB);
int n; int n;
@@ -1256,7 +1259,7 @@ win_lbr_chartabsize(
* Count all characters from first non-blank after a blank up to next * Count all characters from first non-blank after a blank up to next
* non-blank after a blank. * non-blank after a blank.
*/ */
numberextra = win_col_off(wp); int numberextra = win_col_off(wp);
col2 = vcol; col2 = vcol;
colmax = (colnr_T)(wp->w_width - numberextra - col_adj); colmax = (colnr_T)(wp->w_width - numberextra - col_adj);
if (vcol >= colmax) if (vcol >= colmax)
@@ -1296,72 +1299,93 @@ win_lbr_chartabsize(
/* /*
* May have to add something for 'breakindent' and/or 'showbreak' * May have to add something for 'breakindent' and/or 'showbreak'
* string at start of line. * string at start of line.
* Set *headp to the size of what we add.
* Do not use 'showbreak' at the NUL after the text. * Do not use 'showbreak' at the NUL after the text.
*/ */
added = 0; int head = mb_added;
sbr = (c == NUL || no_sbr) ? empty_option : get_showbreak_value(wp); sbr = (c == NUL || no_sbr) ? empty_option : get_showbreak_value(wp);
if ((*sbr != NUL || wp->w_p_bri) && wp->w_p_wrap && vcol != 0) if ((*sbr != NUL || wp->w_p_bri) && wp->w_p_wrap)
{ {
colnr_T sbrlen = 0; int col_off_prev = win_col_off(wp);
int numberwidth = win_col_off(wp); int width2 = wp->w_width - col_off_prev + win_col_off2(wp);
vcol += mb_added;
numberextra = numberwidth;
vcol += numberextra + mb_added;
#ifdef FEAT_PROP_POPUP #ifdef FEAT_PROP_POPUP
vcol -= wp->w_virtcol_first_char; vcol -= wp->w_virtcol_first_char;
#endif #endif
if (vcol >= (colnr_T)wp->w_width) colnr_T wcol = vcol + col_off_prev;
// cells taken by 'showbreak'/'breakindent' before current char
int head_prev = 0;
if (wcol >= wp->w_width)
{ {
vcol -= wp->w_width; wcol -= wp->w_width;
numberextra = wp->w_width - (numberextra - win_col_off2(wp)); col_off_prev = wp->w_width - width2;
if (vcol >= numberextra && numberextra > 0) if (wcol >= width2 && width2 > 0)
vcol %= numberextra; wcol %= width2;
if (*sbr != NUL) if (*sbr != NUL)
{ head_prev += vim_strsize(sbr);
sbrlen = (colnr_T)MB_CHARLEN(sbr); if (wp->w_p_bri)
if (vcol >= sbrlen) head_prev += get_breakindent_win(wp, line);
vcol -= sbrlen; if (wcol < head_prev)
} wcol = head_prev;
if (vcol >= numberextra && numberextra > 0) wcol += col_off_prev;
vcol = vcol % numberextra;
else if (vcol > 0 && numberextra > 0)
vcol += numberwidth - win_col_off2(wp);
numberwidth -= win_col_off2(wp);
} }
if (vcol == 0 || vcol + size + sbrlen > (colnr_T)wp->w_width)
if ((vcol > 0 && wcol == col_off_prev + head_prev)
|| wcol + size > wp->w_width)
{ {
added = 0; int added = 0;
if (*sbr != NUL) colnr_T max_head_vcol = cts->cts_max_head_vcol;
if (vcol > 0 && wcol == col_off_prev + head_prev)
{ {
if (size + sbrlen + numberwidth > (colnr_T)wp->w_width) added += head_prev;
if (max_head_vcol <= 0 || vcol < max_head_vcol)
head += head_prev;
}
// cells taken by 'showbreak'/'breakindent' halfway current char
int head_mid = 0;
if (*sbr != NUL)
head_mid += vim_strsize(sbr);
if (wp->w_p_bri)
head_mid += get_breakindent_win(wp, line);
if (head_mid > 0)
{
if (wcol + size > wp->w_width)
{ {
// calculate effective window width // calculate effective window width
int width = (colnr_T)wp->w_width - sbrlen - numberwidth; int prev_rem = wp->w_width - wcol;
int prev_width = vcol int width = width2 - head_mid;
? ((colnr_T)wp->w_width - (sbrlen + vcol)) : 0;
if (width <= 0) if (width <= 0)
width = (colnr_T)1; width = 1;
added += ((size - prev_width) / width) * vim_strsize(sbr); // divide "size - prev_width" by "width", rounding up
if ((size - prev_width) % width) int cnt = (size - prev_rem + width - 1) / width;
// wrapped, add another length of 'sbr' added += cnt * head_mid;
added += vim_strsize(sbr);
if (max_head_vcol == 0
|| vcol + size + added < max_head_vcol)
head += cnt * head_mid;
else if (max_head_vcol > vcol + head_prev + prev_rem)
head += (max_head_vcol - (vcol + head_prev + prev_rem)
+ width2 - 1) / width2 * head_mid;
#ifdef FEAT_PROP_POPUP
else if (max_head_vcol < 0)
{
int off = 0;
if ((State & MODE_NORMAL) || cts->cts_start_incl)
off += cts->cts_cur_text_width;
if (off >= prev_rem)
head += (1 + (off - prev_rem) / width) * head_mid;
}
#endif
} }
else
added += vim_strsize(sbr);
} }
if (wp->w_p_bri)
added += get_breakindent_win(wp, line);
size += added; size += added;
if (vcol != 0)
added = 0;
} }
} }
if (headp != NULL) if (headp != NULL)
*headp = added + mb_added; *headp = head;
return size; return size;
# endif # endif
#endif #endif
@@ -1483,6 +1507,7 @@ getvcol(
} }
init_chartabsize_arg(&cts, wp, pos->lnum, 0, line, line); init_chartabsize_arg(&cts, wp, pos->lnum, 0, line, line);
cts.cts_max_head_vcol = -1;
/* /*
* This function is used very often, do some speed optimizations. * This function is used very often, do some speed optimizations.

View File

@@ -1110,14 +1110,10 @@ win_line(
int n_attr3 = 0; // chars with overruling special attr int n_attr3 = 0; // chars with overruling special attr
int saved_attr3 = 0; // char_attr saved for n_attr3 int saved_attr3 = 0; // char_attr saved for n_attr3
int n_skip = 0; // nr of cells to skip for 'nowrap' or int skip_cells = 0; // nr of cells to skip for w_leftcol or
// concealing // w_skipcol or concealing
#ifdef FEAT_PROP_POPUP int skipped_cells = 0; // nr of skipped cells for virtual text
int skip_cells = 0; // nr of cells to skip for virtual text // to be added to wlv.vcol later
// after the line, when w_skipcol is
// larger than the text length
#endif
int fromcol_prev = -2; // start of inverting after cursor int fromcol_prev = -2; // start of inverting after cursor
int noinvcur = FALSE; // don't invert the cursor int noinvcur = FALSE; // don't invert the cursor
int lnum_in_visual_area = FALSE; int lnum_in_visual_area = FALSE;
@@ -1665,11 +1661,14 @@ win_line(
char_u *prev_ptr = ptr; char_u *prev_ptr = ptr;
chartabsize_T cts; chartabsize_T cts;
int charsize = 0; int charsize = 0;
int head = 0;
init_chartabsize_arg(&cts, wp, lnum, wlv.vcol, line, ptr); init_chartabsize_arg(&cts, wp, lnum, wlv.vcol, line, ptr);
cts.cts_max_head_vcol = v;
while (cts.cts_vcol < v && *cts.cts_ptr != NUL) while (cts.cts_vcol < v && *cts.cts_ptr != NUL)
{ {
charsize = win_lbr_chartabsize(&cts, NULL); head = 0;
charsize = win_lbr_chartabsize(&cts, &head);
cts.cts_vcol += charsize; cts.cts_vcol += charsize;
prev_ptr = cts.cts_ptr; prev_ptr = cts.cts_ptr;
MB_PTR_ADV(cts.cts_ptr); MB_PTR_ADV(cts.cts_ptr);
@@ -1698,20 +1697,9 @@ win_line(
{ {
wlv.vcol -= charsize; wlv.vcol -= charsize;
ptr = prev_ptr; ptr = prev_ptr;
// If the character fits on the screen, don't need to skip it.
// Except for a TAB.
if (((*mb_ptr2cells)(ptr) >= charsize || *ptr == TAB)
&& wlv.col == 0)
n_skip = v - wlv.vcol;
} }
if (v > wlv.vcol)
#ifdef FEAT_PROP_POPUP skip_cells = v - wlv.vcol - head;
// If there the text doesn't reach to the desired column, need to skip
// "skip_cells" cells when virtual text follows.
if ((!wp->w_p_wrap || (lnum == wp->w_topline && wp->w_skipcol > 0))
&& v > wlv.vcol)
skip_cells = v - wlv.vcol;
#endif
// Adjust for when the inverted text is before the screen, // Adjust for when the inverted text is before the screen,
// and when the start of the inverted text is before the screen. // and when the start of the inverted text is before the screen.
@@ -2205,6 +2193,7 @@ win_line(
wlv.n_attr_skip -= skip_cells; wlv.n_attr_skip -= skip_cells;
if (wlv.n_attr_skip < 0) if (wlv.n_attr_skip < 0)
wlv.n_attr_skip = 0; wlv.n_attr_skip = 0;
skipped_cells += skip_cells;
skip_cells = 0; skip_cells = 0;
} }
else else
@@ -2212,6 +2201,7 @@ win_line(
// the whole text is left of the window, drop // the whole text is left of the window, drop
// it and advance to the next one // it and advance to the next one
skip_cells -= wlv.n_extra; skip_cells -= wlv.n_extra;
skipped_cells += wlv.n_extra;
wlv.n_extra = 0; wlv.n_extra = 0;
wlv.n_attr_skip = 0; wlv.n_attr_skip = 0;
bail_out = TRUE; bail_out = TRUE;
@@ -2592,11 +2582,15 @@ win_line(
#ifdef FEAT_LINEBREAK #ifdef FEAT_LINEBREAK
c0 = *ptr; c0 = *ptr;
#endif #endif
#ifdef FEAT_PROP_POPUP
if (c == NUL) if (c == NUL)
{
#ifdef FEAT_PROP_POPUP
// text is finished, may display a "below" virtual text // text is finished, may display a "below" virtual text
did_line = TRUE; did_line = TRUE;
#endif #endif
// no more cells to skip
skip_cells = 0;
}
if (has_mbyte) if (has_mbyte)
{ {
@@ -2762,7 +2756,7 @@ win_line(
// If a double-width char doesn't fit at the left side display // If a double-width char doesn't fit at the left side display
// a '<' in the first column. Don't do this for unprintable // a '<' in the first column. Don't do this for unprintable
// characters. // characters.
if (n_skip > 0 && mb_l > 1 && wlv.n_extra == 0) if (skip_cells > 0 && mb_l > 1 && wlv.n_extra == 0)
{ {
wlv.n_extra = 1; wlv.n_extra = 1;
wlv.c_extra = MB_FILLER_CHAR; wlv.c_extra = MB_FILLER_CHAR;
@@ -3438,10 +3432,10 @@ win_line(
wlv.n_extra = 0; wlv.n_extra = 0;
n_attr = 0; n_attr = 0;
} }
else if (n_skip == 0) else if (skip_cells == 0)
{ {
is_concealing = TRUE; is_concealing = TRUE;
n_skip = 1; skip_cells = 1;
} }
mb_c = c; mb_c = c;
if (enc_utf8 && utf_char2len(c) > 1) if (enc_utf8 && utf_char2len(c) > 1)
@@ -3459,7 +3453,7 @@ win_line(
is_concealing = FALSE; is_concealing = FALSE;
} }
if (n_skip > 0 && did_decrement_ptr) if (skip_cells > 0 && did_decrement_ptr)
// not showing the '>', put pointer back to avoid getting stuck // not showing the '>', put pointer back to avoid getting stuck
++ptr; ++ptr;
@@ -3472,7 +3466,7 @@ win_line(
if (!did_wcol && wlv.draw_state == WL_LINE if (!did_wcol && wlv.draw_state == WL_LINE
&& wp == curwin && lnum == wp->w_cursor.lnum && wp == curwin && lnum == wp->w_cursor.lnum
&& conceal_cursor_line(wp) && conceal_cursor_line(wp)
&& (int)wp->w_virtcol <= wlv.vcol + n_skip) && (int)wp->w_virtcol <= wlv.vcol + skip_cells)
{ {
# ifdef FEAT_RIGHTLEFT # ifdef FEAT_RIGHTLEFT
if (wp->w_p_rl) if (wp->w_p_rl)
@@ -3797,7 +3791,7 @@ win_line(
// Store character to be displayed. // Store character to be displayed.
// Skip characters that are left of the screen for 'nowrap'. // Skip characters that are left of the screen for 'nowrap'.
if (wlv.draw_state < WL_LINE || n_skip <= 0) if (wlv.draw_state < WL_LINE || skip_cells <= 0)
{ {
// Store the character. // Store the character.
#if defined(FEAT_RIGHTLEFT) #if defined(FEAT_RIGHTLEFT)
@@ -3893,7 +3887,7 @@ win_line(
#ifdef FEAT_CONCEAL #ifdef FEAT_CONCEAL
else if (wp->w_p_cole > 0 && is_concealing) else if (wp->w_p_cole > 0 && is_concealing)
{ {
--n_skip; --skip_cells;
++wlv.vcol_off_co; ++wlv.vcol_off_co;
if (wlv.n_extra > 0) if (wlv.n_extra > 0)
wlv.vcol_off_co += wlv.n_extra; wlv.vcol_off_co += wlv.n_extra;
@@ -3973,7 +3967,13 @@ win_line(
} }
#endif // FEAT_CONCEAL #endif // FEAT_CONCEAL
else else
--n_skip; --skip_cells;
if (wlv.draw_state > WL_NR && skipped_cells > 0)
{
wlv.vcol += skipped_cells;
skipped_cells = 0;
}
// Only advance the "wlv.vcol" when after the 'number' or // Only advance the "wlv.vcol" when after the 'number' or
// 'relativenumber' column. // 'relativenumber' column.

View File

@@ -3705,8 +3705,13 @@ ins_esc(
State = MODE_NORMAL; State = MODE_NORMAL;
may_trigger_modechanged(); may_trigger_modechanged();
// need to position cursor again when on a TAB // need to position cursor again when on a TAB and when on a char with
if (gchar_cursor() == TAB) // virtual text.
if (gchar_cursor() == TAB
#ifdef FEAT_PROP_POPUP
|| curbuf->b_has_textprop
#endif
)
curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL); curwin->w_valid &= ~(VALID_WROW|VALID_WCOL|VALID_VIRTCOL);
setmouse(); setmouse();

View File

@@ -4816,21 +4816,22 @@ typedef struct {
// Argument for lbr_chartabsize(). // Argument for lbr_chartabsize().
typedef struct { typedef struct {
win_T *cts_win; win_T *cts_win;
char_u *cts_line; // start of the line char_u *cts_line; // start of the line
char_u *cts_ptr; // current position in line char_u *cts_ptr; // current position in line
#ifdef FEAT_PROP_POPUP #ifdef FEAT_PROP_POPUP
int cts_text_prop_count; // number of text props; when zero int cts_text_prop_count; // number of text props; when zero
// cts_text_props is not used // cts_text_props is not used
textprop_T *cts_text_props; // text props (allocated) textprop_T *cts_text_props; // text props (allocated)
char cts_has_prop_with_text; // TRUE if a property inserts text char cts_has_prop_with_text; // TRUE if a property inserts text
int cts_cur_text_width; // width of current inserted text int cts_cur_text_width; // width of current inserted text
int cts_prop_lines; // nr of properties above or below int cts_prop_lines; // nr of properties above or below
int cts_first_char; // width text props above the line int cts_first_char; // width text props above the line
int cts_with_trailing; // include size of trailing props with int cts_with_trailing; // include size of trailing props with
// last character // last character
int cts_start_incl; // prop has true "start_incl" arg int cts_start_incl; // prop has true "start_incl" arg
#endif #endif
int cts_vcol; // virtual column at current position int cts_vcol; // virtual column at current position
int cts_max_head_vcol; // see win_lbr_chartabsize()
} chartabsize_T; } chartabsize_T;
/* /*

View File

@@ -0,0 +1,6 @@
|<+0#0000e05#ffffff0|-@5|>|<|-@5|>|<|-@5|>|1+0#e000e06&|2|1|2|1|2
|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|<+0#0000e05&|-
@5|>>a+0#0000000&| @22
|~+0#4040ff13&| @28
| +0#0000000&@14|1|,|5|-|9|7| @4|A|l@1|

View File

@@ -0,0 +1,6 @@
|<+0#4040ff13#ffffff0@2|2+0#e000e06&|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2| +0#0000000&@1
@5> |a| @22
|~+0#4040ff13&| @28
|~| @28
|~| @28
| +0#0000000&@14|1|,|4|-|9|6| @4|A|l@1|

View File

@@ -0,0 +1,6 @@
|<+0#4040ff13#ffffff0@2| +0#e000e06&@1> |a+0#0000000&| @22
|~+0#4040ff13&| @28
|~| @28
|~| @28
|~| @28
| +0#0000000&@14|1|,|4|-|9|6| @4|A|l@1|

View File

@@ -0,0 +1,6 @@
|<+0#4040ff13#ffffff0@2|2+0#e000e06&|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|<+0#0000e05&|-
@5|>>a+0#0000000&| @22
|~+0#4040ff13&| @28
|~| @28
| +0#0000000&@14|1|,|5|-|9|7| @4|A|l@1|

View File

@@ -0,0 +1,6 @@
|<+0#4040ff13#ffffff0@2|2+0#e000e06&|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|<+0#0000e05&|-
@5|>>a+0#0000000&| @22
|~+0#4040ff13&| @28
|~| @28
|~| @28
| +0#0000000&@14|1|,|5|-|9|7| @4|A|l@1|

View File

@@ -0,0 +1,6 @@
|<+0#4040ff13#ffffff0@2|-+0#0000e05&@1|>>a+0#0000000&| @22
|~+0#4040ff13&| @28
|~| @28
|~| @28
|~| @28
| +0#0000000&@14|1|,|5|-|9|7| @4|A|l@1|

View File

@@ -0,0 +1,6 @@
|<+0#0000e05#ffffff0|-@5|>|<|-@5|>|<|-@5|>|1+0#e000e06&|2|1|2|1|2
|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2><+0#0000e05&|-
@5|>|a+0#0000000&| @22
|~+0#4040ff13&| @28
| +0#0000000&@14|1|,|4|-|8|9| @4|A|l@1|

View File

@@ -0,0 +1,6 @@
|<+0#0000e05#ffffff0|-@5|>|<|-@5|>|<|-@5|>>1+0#e000e06&|2|1|2|1|2
|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|<+0#0000e05&|-
@5|>|a+0#0000000&| @22
|~+0#4040ff13&| @28
|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@2|1|,|4|-|2|5| @4|A|l@1|

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@23>1+0#e000e06&|2|1|2|1|2
|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2| +0#0000000&@1
@6|a| @22
|~+0#4040ff13&| @28
|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@2|1|,|4|-|2|5| @4|A|l@1|

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@23|1+0#e000e06&|2|1|2|1|2
|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2| +0#0000000&@1
@5> |a| @22
|~+0#4040ff13&| @28
| +0#0000000&@14|1|,|4|-|9|6| @4|A|l@1|

View File

@@ -0,0 +1,6 @@
|<+0#4040ff13#ffffff0@2|2+0#e000e06&|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2
|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2|1|2| +0#0000000&@1
@5> |a| @22
|~+0#4040ff13&| @28
|~| @28
| +0#0000000&@14|1|,|4|-|9|6| @4|A|l@1|

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@1|1| |a@25
| @5|++0#4040ff13&|a+0#0000000&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&>a+0#0000000&| @20
|:|s|e|t| |n|o|r|u|l|e|r| @17

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
|~+0#4040ff13&| @28
|~| @28
| +0#0000000&@29

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
|~+0#4040ff13&| @28
|~| @28
|~| @28
| +0#0000000&@29

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&>a+0#e000e06&| +0#0000000&@21
|~+0#4040ff13&| @28
|~| @28
|~| @28
|~| @28
| +0#0000000&@29

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@1|1| |a@2|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
|~+0#4040ff13&| @28
| +0#0000000&@29

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
|~+0#4040ff13&| @28
|~| @28
| +0#0000000&@29

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
|~+0#4040ff13&| @28
|~| @28
|~| @28
| +0#0000000&@29

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&>a+0#e000e06&| +0#0000000&@21
|~+0#4040ff13&| @28
|~| @28
|~| @28
|~| @28
| +0#0000000&@29

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@1|1| |a@2>1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&|a+0#0000000&| @21
|~+0#4040ff13&| @28
|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@17

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@1|1| >1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|a+0#0000000&| @1
|~+0#4040ff13&| @28
|~| @28
|-+2#0000000&@1| |I|N|S|E|R|T| |-@1| +0&&@17

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@1|1| |1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3>a+0#0000000&| @1
|~+0#4040ff13&| @28
|~| @28
| +0#0000000&@29

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&|a+0#0000000&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&>a+0#0000000&| @20
|~+0#4040ff13&| @28
|:+0#0000000&|s|e|t| |n|o|r|u|l|e|r| @17

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3>a+0#0000000&| @1
|~+0#4040ff13&| @28
|~| @28
|~| @28
| +0#0000000&@29

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3>a+0#0000000&| @1
|~+0#4040ff13&| @28
|~| @28
|~| @28
|~| @28
| +0#0000000&@29

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&>a+0#0000000&| @20
|~+0#4040ff13&| @28
|~| @28
|:+0#0000000&|s|e|t| |n|o|r|u|l|e|r| @17

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&>a+0#0000000&| @20
|~+0#4040ff13&| @28
|~| @28
|~| @28
|:+0#0000000&|s|e|t| |n|o|r|u|l|e|r| @17

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&|3+0#e000e06&>a+0#0000000&| @20
|~+0#4040ff13&| @28
|~| @28
|~| @28
|~| @28
|:+0#0000000&|s|e|t| |n|o|r|u|l|e|r| @17

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@1|1| |a@25
| @5|++0#4040ff13&|a+0#0000000&>1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|a+0#0000000&| @20
|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@17

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@1|1| |a@25
| @5|++0#4040ff13&>1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&|a+0#0000000&| @21
|-+2&&@1| |I|N|S|E|R|T| |-@1| +0&&@17

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@1|1| |a@25
| @5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
@30

View File

@@ -0,0 +1,6 @@
| +0&#ffffff0@5|++0#4040ff13&|1+0#e000e06&|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2
| +0#0000000&@5|++0#4040ff13&|3+0#e000e06&|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1
| +0#0000000&@5|++0#4040ff13&|2+0#e000e06&|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3|1|2|3
| +0#0000000&@5|++0#4040ff13&>a+0#0000000&| @21
|~+0#4040ff13&| @28
| +0#0000000&@29

View File

@@ -15,7 +15,7 @@ function s:screen_lines(lnum, width) abort
endfunction endfunction
func s:compare_lines(expect, actual) func s:compare_lines(expect, actual)
call assert_equal(join(a:expect, "\n"), join(a:actual, "\n")) call assert_equal(a:expect, a:actual)
endfunc endfunc
function s:test_windows(...) function s:test_windows(...)
@@ -331,4 +331,45 @@ func Test_list_with_tab_and_skipping_first_chars()
call s:close_windows() call s:close_windows()
endfunc endfunc
func Test_ctrl_char_on_wrap_column()
call s:test_windows("setl nolbr wrap sbr=")
call setline(1, 'aaa' .. repeat("\<C-A>", 150) .. 'bbb')
call cursor(1,1)
norm! $
redraw!
let expect=[
\ '<<<^A^A^A^A^A^A^A^A^',
\ 'A^A^A^A^A^A^A^A^A^A^',
\ 'A^A^A^A^A^A^A^A^A^A^',
\ 'A^A^A^A^A^A^A^A^A^A^',
\ 'A^A^A^A^A^A^A^A^A^A^',
\ 'A^A^A^A^A^A^A^A^A^A^',
\ 'A^A^A^A^A^A^A^A^A^A^',
\ 'A^A^A^A^A^A^A^A^A^A^',
\ 'A^A^A^A^A^A^A^A^A^A^',
\ 'A^Abbb ']
let lines = s:screen_lines([1, 10], winwidth(0))
call s:compare_lines(expect, lines)
call assert_equal(len(expect), winline())
call assert_equal(strwidth(trim(expect[-1], ' ', 2)), wincol())
setl sbr=!!
redraw!
let expect=[
\ '!!A^A^A^A^A^A^A^A^A^',
\ '!!A^A^A^A^A^A^A^A^A^',
\ '!!A^A^A^A^A^A^A^A^A^',
\ '!!A^A^A^A^A^A^A^A^A^',
\ '!!A^A^A^A^A^A^A^A^A^',
\ '!!A^A^A^A^A^A^A^A^A^',
\ '!!A^A^A^A^A^A^A^A^A^',
\ '!!A^A^A^A^A^A^A^A^A^',
\ '!!A^A^A^A^A^A^A^A^A^',
\ '!!A^A^A^A^A^A^Abbb ']
let lines = s:screen_lines([1, 10], winwidth(0))
call s:compare_lines(expect, lines)
call assert_equal(len(expect), winline())
call assert_equal(strwidth(trim(expect[-1], ' ', 2)), wincol())
call s:close_windows()
endfunc
" vim: shiftwidth=2 sts=2 expandtab " vim: shiftwidth=2 sts=2 expandtab

View File

@@ -249,7 +249,6 @@ endfunc
func Test_chinese_char_on_wrap_column() func Test_chinese_char_on_wrap_column()
call s:test_windows("setl nolbr wrap sbr=") call s:test_windows("setl nolbr wrap sbr=")
syntax off
call setline(1, [ call setline(1, [
\ 'aaaaaaaaaaaaaaaaaaa中'. \ 'aaaaaaaaaaaaaaaaaaa中'.
\ 'aaaaaaaaaaaaaaaaa中'. \ 'aaaaaaaaaaaaaaaaa中'.
@@ -278,6 +277,84 @@ func Test_chinese_char_on_wrap_column()
\ '中hello '] \ '中hello ']
let lines = s:screen_lines([1, 10], winwidth(0)) let lines = s:screen_lines([1, 10], winwidth(0))
call s:compare_lines(expect, lines) call s:compare_lines(expect, lines)
call assert_equal(len(expect), winline())
call assert_equal(strwidth(trim(expect[-1], ' ', 2)), wincol())
call s:close_windows()
endfunc
func Test_chinese_char_on_wrap_column_sbr()
call s:test_windows("setl nolbr wrap sbr=!!!")
call setline(1, [
\ 'aaaaaaaaaaaaaaaaaaa中'.
\ 'aaaaaaaaaaaaaa中'.
\ 'aaaaaaaaaaaaaa中'.
\ 'aaaaaaaaaaaaaa中'.
\ 'aaaaaaaaaaaaaa中'.
\ 'aaaaaaaaaaaaaa中'.
\ 'aaaaaaaaaaaaaa中'.
\ 'aaaaaaaaaaaaaa中'.
\ 'aaaaaaaaaaaaaa中'.
\ 'aaaaaaaaaaaaaa中'.
\ 'hello'])
call cursor(1,1)
norm! $
redraw!
let expect=[
\ '!!!中aaaaaaaaaaaaaa>',
\ '!!!中aaaaaaaaaaaaaa>',
\ '!!!中aaaaaaaaaaaaaa>',
\ '!!!中aaaaaaaaaaaaaa>',
\ '!!!中aaaaaaaaaaaaaa>',
\ '!!!中aaaaaaaaaaaaaa>',
\ '!!!中aaaaaaaaaaaaaa>',
\ '!!!中aaaaaaaaaaaaaa>',
\ '!!!中aaaaaaaaaaaaaa>',
\ '!!!中hello ']
let lines = s:screen_lines([1, 10], winwidth(0))
call s:compare_lines(expect, lines)
call assert_equal(len(expect), winline())
call assert_equal(strwidth(trim(expect[-1], ' ', 2)), wincol())
call s:close_windows()
endfunc
func Test_unprintable_char_on_wrap_column()
call s:test_windows("setl nolbr wrap sbr=")
call setline(1, 'aaa' .. repeat("\uFEFF", 50) .. 'bbb')
call cursor(1,1)
norm! $
redraw!
let expect=[
\ '<<<<feff><feff><feff',
\ '><feff><feff><feff><',
\ 'feff><feff><feff><fe',
\ 'ff><feff><feff><feff',
\ '><feff><feff><feff><',
\ 'feff><feff><feff><fe',
\ 'ff><feff><feff><feff',
\ '><feff><feff><feff><',
\ 'feff><feff><feff><fe',
\ 'ff>bbb ']
let lines = s:screen_lines([1, 10], winwidth(0))
call s:compare_lines(expect, lines)
call assert_equal(len(expect), winline())
call assert_equal(strwidth(trim(expect[-1], ' ', 2)), wincol())
setl sbr=!!
redraw!
let expect=[
\ '!!><feff><feff><feff',
\ '!!><feff><feff><feff',
\ '!!><feff><feff><feff',
\ '!!><feff><feff><feff',
\ '!!><feff><feff><feff',
\ '!!><feff><feff><feff',
\ '!!><feff><feff><feff',
\ '!!><feff><feff><feff',
\ '!!><feff><feff><feff',
\ '!!><feff><feff>bbb ']
let lines = s:screen_lines([1, 10], winwidth(0))
call s:compare_lines(expect, lines)
call assert_equal(len(expect), winline())
call assert_equal(strwidth(trim(expect[-1], ' ', 2)), wincol())
call s:close_windows() call s:close_windows()
endfunc endfunc

View File

@@ -2630,6 +2630,110 @@ func Test_prop_inserts_text_visual_block()
call StopVimInTerminal(buf) call StopVimInTerminal(buf)
endfunc endfunc
func Run_test_prop_inserts_text_showbreak(cmd)
CheckRunVimInTerminal
let lines =<< trim END
highlight! link LineNr Normal
call setline(1, repeat('a', 28))
call prop_type_add('theprop', #{highlight: 'Special'})
call prop_add(1, 28, #{type: 'theprop', text: repeat('123', 23), text_wrap: 'wrap'})
setlocal number showbreak=+ breakindent breakindentopt=shift:2
setlocal scrolloff=0 smoothscroll
normal! $
END
let lines = insert(lines, a:cmd)
call writefile(lines, 'XscriptPropsShowbreak', 'D')
let buf = RunVimInTerminal('-S XscriptPropsShowbreak', #{rows: 6, cols: 30})
call term_sendkeys(buf, ":set noruler\<CR>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_1', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_2', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_3', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_4', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_5', {})
call term_sendkeys(buf, "zbi")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_6', {})
call term_sendkeys(buf, "\<BS>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_7', {})
call term_sendkeys(buf, "\<Esc>l")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_8', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_9', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_10', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_11', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_12', {})
call term_sendkeys(buf, "023x$")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_13', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_14', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_15', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_16', {})
call term_sendkeys(buf, "zbi")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_17', {})
call term_sendkeys(buf, "\<C-U>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_18', {})
call term_sendkeys(buf, "\<Esc>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_19', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_20', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_inserts_text_showbreak_21', {})
call StopVimInTerminal(buf)
endfunc
func Test_prop_inserts_text_showbreak()
call Run_test_prop_inserts_text_showbreak('')
" because of 'breakindent' the screendumps are the same
call Run_test_prop_inserts_text_showbreak('set cpoptions+=n')
endfunc
func Test_prop_before_tab_skipcol()
CheckRunVimInTerminal
let lines =<< trim END
call setline(1, repeat("\t", 4) .. 'a')
call prop_type_add('theprop', #{highlight: 'Special'})
call prop_add(1, 4, #{type: 'theprop', text: repeat('12', 32), text_wrap: 'wrap'})
setlocal list listchars=tab:<-> scrolloff=0 smoothscroll
normal! $
END
call writefile(lines, 'XscriptPropsBeforeTabSkipcol', 'D')
let buf = RunVimInTerminal('-S XscriptPropsBeforeTabSkipcol', #{rows: 6, cols: 30})
call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_1', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_2', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_3', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_4', {})
call term_sendkeys(buf, "zbh")
call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_5', {})
call term_sendkeys(buf, "i")
call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_6', {})
call term_sendkeys(buf, "\<C-O>:setlocal nolist\<CR>")
call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_7', {})
call term_sendkeys(buf, "\<Esc>l")
call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_8', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_9', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_10', {})
call term_sendkeys(buf, "\<C-E>")
call VerifyScreenDump(buf, 'Test_prop_before_tab_skipcol_11', {})
call StopVimInTerminal(buf)
endfunc
func Test_prop_add_with_text_fails() func Test_prop_add_with_text_fails()
call prop_type_add('failing', #{highlight: 'ErrorMsg'}) call prop_type_add('failing', #{highlight: 'ErrorMsg'})
call assert_fails("call prop_add(1, 0, #{type: 'failing', text: 'X', end_lnum: 1})", 'E1305:') call assert_fails("call prop_add(1, 0, #{type: 'failing', text: 'X', end_lnum: 1})", 'E1305:')

View File

@@ -699,6 +699,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 */
/**/
1783,
/**/ /**/
1782, 1782,
/**/ /**/