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 <mattn.jp@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
// 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;
}
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 652,
/**/
651,
/**/