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: #18506

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2025-10-07 20:53:48 +00:00
committed by Christian Brabandt
parent 474b981e40
commit a084914361
7 changed files with 39 additions and 10 deletions

View File

@ -60,11 +60,8 @@ coladvance_force(colnr_T wcol)
if (wcol == MAXCOL)
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;
}
@ -101,11 +98,8 @@ coladvance(colnr_T wantcol)
if (wantcol == MAXCOL || rc == FAIL)
curwin->w_valid &= ~VALID_VIRTCOL;
else if (*ml_get_cursor() != TAB)
{
// Virtcol is valid when not on a TAB
curwin->w_valid |= VALID_VIRTCOL;
curwin->w_virtcol = wantcol;
}
set_valid_virtcol(curwin, wantcol);
return rc;
}