mini-vimrc.vim:
set nowrap
Vim version: 9.1.2077
Reproduction steps:
Vim -Nu mini-vimrc.vim100Ix <esc>:echo prop_type_add("foo", {}) | echo prop_add(1, 1, #{text:repeat("…", 70),type:"foo"}) <cr>100Iy <esc>0150zlOn first line first column, … displayed to � (U+FFFD)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Yeah, it looks like side scrolling does not correctly redraw the text properties. But a manual redraw <Ctrl-L> fixes it
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
IIRC I tried to fix the before:
diff --git a/src/drawline.c b/src/drawline.c index ef776dc20..2a9abe8e5 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -2357,22 +2357,33 @@ win_line( // column we need to skip cells. if (skip_cells > 0) { - if (wlv.n_extra > skip_cells) + int virt_text_width = mb_string2cells(wlv.p_extra, -1); + if (virt_text_width > skip_cells) { - wlv.n_extra -= skip_cells; - wlv.p_extra += skip_cells; - wlv.n_attr_skip -= skip_cells; + int skip_cells_remaining = skip_cells; + // Skip cells in the text. + while (skip_cells_remaining > 0) + { + int cells = (*mb_ptr2cells)(wlv.p_extra); + if (cells > skip_cells_remaining) + break; + int c_len = (*mb_ptr2len)(wlv.p_extra); + skip_cells_remaining -= cells; + wlv.p_extra += c_len; + wlv.n_extra -= c_len; + wlv.n_attr_skip--; + } if (wlv.n_attr_skip < 0) wlv.n_attr_skip = 0; - skipped_cells += skip_cells; - skip_cells = 0; + skipped_cells += skip_cells - skip_cells_remaining; + skip_cells = skip_cells_remaining; } else { // the whole text is left of the window, drop // it and advance to the next one - skip_cells -= wlv.n_extra; - skipped_cells += wlv.n_extra; + skip_cells -= virt_text_width; + skipped_cells += virt_text_width; wlv.n_extra = 0; wlv.n_attr_skip = 0; bail_out = TRUE;
But I didn't fully understand the purpose of n_attr_skip and forgot about it.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()