fix(redraw): update curswant for Visual selection (#34241)

Problem:  Blockwise Visual selection not redrawn correctly when moving
          cursor for more than 1 cells with 'virtualedit'.
Solution: Restore the curswant update removed in 6679687bb3.
This commit is contained in:
zeertzjq
2025-05-31 07:47:13 +08:00
committed by GitHub
parent ade64c3ca3
commit 7ed8e96994
2 changed files with 25 additions and 0 deletions

View File

@ -595,6 +595,11 @@ int update_screen(void)
curwin->w_redr_type = UPD_NOT_VALID;
}
if (curwin->w_redr_type == UPD_INVERTED) {
// Update w_curswant so that the end of Visual selection is correct.
update_curswant();
}
// Redraw the tab pages line if needed.
if (redraw_tabline || type >= UPD_NOT_VALID) {
update_window_hl(curwin, type >= UPD_NOT_VALID);