From: Foxe Chen Date: Mon, 3 Aug 2026 20:13:17 +0000 (+0000) Subject: patch 9.2.0905: MS-Windows: ghost cursor with ligatures X-Git-Tag: v9.2.0905^0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b362f0e2f953aa0080a6f69b1a72da8846e10032;p=thirdparty%2Fvim.git patch 9.2.0905: MS-Windows: ghost cursor with ligatures Problem: With ligatures enabled, a ghost cursor can be left on screen because the cursor is marked valid before the ligature cleanup, which redraws the cell with gui_screenchar() and invalidates the cursor again (ubaldot) Solution: Set gui.cursor_is_valid only after the ligature redraw is done, so it isn't cleared afterwards (Foxe Chen). fixes: #20916 closes: #20924 Signed-off-by: Foxe Chen Signed-off-by: Christian Brabandt --- diff --git a/src/gui.c b/src/gui.c index 5d6eae1054..e2b3b40218 100644 --- a/src/gui.c +++ b/src/gui.c @@ -1412,9 +1412,6 @@ gui_update_cursor( } break; } - // gui_redraw_block() may invalidate the cursor, make sure to validate - // it again. - gui.cursor_is_valid = true; # ifndef USE_GTK4 if ((lig_left || lig_right) && shape->shape != SHAPE_BLOCK) @@ -1430,6 +1427,9 @@ gui_update_cursor( gui.col = old; } # endif + // gui_redraw_block()/gui_screenchar() may invalidate the cursor, make sure + // to validate it again. + gui.cursor_is_valid = true; #endif old_hl_mask = gui.highlight_mask; diff --git a/src/version.c b/src/version.c index abd19fb95a..7bb915f932 100644 --- a/src/version.c +++ b/src/version.c @@ -763,6 +763,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 905, /**/ 904, /**/