patch 9.2.0652: popup: stale kitty image after clipwindow scrolls out of view
Commit:
https://github.com/vim/vim/commit/d5c4ddcdd284ef7b5d97d1a378fa1852445a0e12
Author: Yasuhiro Matsumoto <
matt...@gmail.com>
Date: Mon Jun 15 18:54:08 2026 +0000
patch 9.2.0652: popup: stale kitty image after clipwindow scrolls out of view
Problem: a clipwindow popup containing an image leaves a stale image on
the terminal after it scrolls out of view, with the kitty
graphics protocol.
Solution: Delete the kitty placement and the GTK4 image and force a
redraw before hiding, mirroring the textprop scroll-out path
(Yasuhiro Matsumoto).
closes: #20525
Signed-off-by: Yasuhiro Matsumoto <
matt...@gmail.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/src/popupwin.c b/src/popupwin.c
index dfd880a82..02ecffbfd 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -2930,6 +2930,25 @@ popup_adjust_position(win_T *wp)
// leaving stray decorations behind.
if (popup_compute_clipwindow_offsets(wp))
{
+ if ((wp->w_popup_flags & POPF_HIDDEN) == 0)
+ {
+#ifdef FEAT_IMAGE_KITTY
+ // delete the kitty placement before hiding, like popup_hide()
+ popup_image_clear_kitty(wp);
+#endif
+#ifdef FEAT_IMAGE_GDK
+ if (gui.in_use)
+ gui_gtk4_remove_image(wp);
+#endif
+#ifdef FEAT_IMAGE
+ if (wp->w_popup_image_data != NULL)
+ {
+ redraw_all_later(UPD_NOT_VALID);
+ status_redraw_all();
+ popup_mask_refresh = TRUE;
+ }
+#endif
+ }
popup_hide_for_textprop(wp);
return;
}
diff --git a/src/version.c b/src/version.c
index 04b04e6b5..7de996977 100644
--- a/src/version.c
+++ b/src/version.c
@@ -759,6 +759,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 652,
/**/
651,
/**/