vim-patch:9.1.1836: 'culopt' "screenline" not redrawn with line("w0") and :retab

Problem:  'cursorlineopt' "screenline" isn't redrawn when moving cursor
          and then using line("w0") and :retab that does nothing.
Solution: Call redraw_for_cursorcolumn() when setting a valid w_virtcol
          (zeertzjq).

closes: vim/vim#18506

a084914361
This commit is contained in:
zeertzjq
2025-10-08 06:51:15 +08:00
parent 236d831d77
commit ba47cb7eda
6 changed files with 70 additions and 25 deletions

View File

@@ -62,8 +62,7 @@ int coladvance_force(colnr_T wcol)
curwin->w_valid &= ~VALID_VIRTCOL;
} else {
// Virtcol is valid
curwin->w_valid |= VALID_VIRTCOL;
curwin->w_virtcol = wcol;
set_valid_virtcol(curwin, wcol);
}
return rc;
}
@@ -83,8 +82,7 @@ int coladvance(win_T *wp, colnr_T wcol)
wp->w_valid &= ~VALID_VIRTCOL;
} else if (*(ml_get_buf(wp->w_buffer, wp->w_cursor.lnum) + wp->w_cursor.col) != TAB) {
// Virtcol is valid when not on a TAB
wp->w_valid |= VALID_VIRTCOL;
wp->w_virtcol = wcol;
set_valid_virtcol(curwin, wcol);
}
return rc;
}