vim9script prop_type_add('test', {}) def g:Test(r: number, g: number, b: number, z: number): void var pixels: blob = repeat([r, g, b], 100 * 100)->list2blob() g:test = popup_create('', { image: { data: pixels, width: 100, height: 100 }, line: 'cursor+1', col: 'cursor', zindex: z, clipwindow: true, textprop: 'test' }) enddef
call prop_add(<line number>, 1, #{type: 'test'})call g:Test(0xff, 0, 0, 100)This only happens when using the kitty graphics protocol. I am suspecting issue is due to the fact that images are retained and not cleared when text is written over it.
Demo:
https://github.com/user-attachments/assets/2d344d99-7f9b-4892-bae9-f304ad3a6b6b
Image should be fully cleared
9.2.620
Terminal: kitty 0.47.1 created by Kovid Goyal
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Can you this patch?
diff --git a/src/popupwin.c b/src/popupwin.c index ac2158f78b..ec5a027346 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -2965,6 +2965,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; }
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Can you this patch?
diff --git a/src/popupwin.c b/src/popupwin.c
index ac2158f78b..ec5a027346 100644
--- a/src/popupwin.c
+++ b/src/popupwin.c
@@ -2965,6 +2965,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;
}
Yes this fixes the issue for me
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()