vim-patch:9.1.1798: Wrong display with 'sms' and long wrapped virt text at EOL (#35930)

Problem:  Wrong display with 'smoothscroll' and long wrapped virtual
          text at EOL.
Solution: Handle w_skipcol inside long wrapped virtual text at EOL
          (zeertzjq).

closes: vim/vim#18408

d9318acc02
This commit is contained in:
zeertzjq
2025-09-27 21:28:40 +08:00
committed by GitHub
parent 1e498b8f77
commit 2aab242a01
2 changed files with 164 additions and 13 deletions

View File

@@ -1477,10 +1477,13 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, int col_rows, b
csarg.max_head_vcol = start_vcol;
int vcol = wlv.vcol;
StrCharInfo ci = utf_ptr2StrCharInfo(ptr);
while (vcol < start_vcol && *ci.ptr != NUL) {
while (vcol < start_vcol) {
cs = win_charsize(cstype, vcol, ci.ptr, ci.chr.value, &csarg);
vcol += cs.width;
prev_ptr = ci.ptr;
if (*prev_ptr == NUL) {
break;
}
ci = utfc_next(ci);
if (wp->w_p_list) {
in_multispace = *prev_ptr == ' ' && (*ci.ptr == ' '