From: Yasuhiro Matsumoto Date: Mon, 15 Jun 2026 18:54:08 +0000 (+0000) Subject: patch 9.2.0652: popup: stale kitty image after clipwindow scrolls out of view X-Git-Tag: v9.2.0652^0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d5c4ddcdd284ef7b5d97d1a378fa1852445a0e12;p=thirdparty%2Fvim.git 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 Signed-off-by: Christian Brabandt --- diff --git a/src/popupwin.c b/src/popupwin.c index dfd880a826..02ecffbfd9 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 04b04e6b56..7de996977f 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, /**/