patch 9.2.0905: MS-Windows: ghost cursor with ligatures
Commit:
https://github.com/vim/vim/commit/b362f0e2f953aa0080a6f69b1a72da8846e10032
Author: Foxe Chen <
chen...@gmail.com>
Date: Mon Aug 3 20:13:17 2026 +0000
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 <
chen...@gmail.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/gui.c b/src/gui.c
index 5d6eae105..e2b3b4021 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 abd19fb95..7bb915f93 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,
/**/