size = win_chartabsize(wp, s, vcol);
if (*s == NUL && !has_lcs_eol)
size = 0; // NUL is not displayed
+# ifdef FEAT_LINEBREAK
+ int is_doublewidth = has_mbyte && size == 2 && MB_BYTE2LEN(*s) > 1;
+# endif
# ifdef FEAT_PROP_POPUP
if (cts->cts_has_prop_with_text)
# endif
# ifdef FEAT_LINEBREAK
- if (has_mbyte && size == 2 && MB_BYTE2LEN(*s) > 1
- && wp->w_p_wrap && in_win_border(wp, vcol))
+ if (is_doublewidth && wp->w_p_wrap && in_win_border(wp, vcol + size - 2))
{
++size; // Count the ">" in the last column.
mb_added = 1;
call StopVimInTerminal(buf)
endfunc
+func Test_prop_inserts_text_before_double_width_wrap()
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ call setline(1, repeat('a', 40) .. '口' .. '12345')
+ call prop_type_add('theprop', #{highlight: 'Special'})
+ call prop_add(1, 41, #{type: 'theprop', text: repeat('b', 9)})
+ normal! $
+ END
+ call writefile(lines, 'XscriptPropsBeforeDoubleWidthWrap', 'D')
+ let buf = RunVimInTerminal('-S XscriptPropsBeforeDoubleWidthWrap', #{rows: 3, cols: 50})
+ call VerifyScreenDump(buf, 'Test_prop_inserts_text_before_double_width_wrap_1', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_prop_inserts_text_lcs_extends()
CheckRunVimInTerminal