From 7fd380f253b3dd5768be32ac984294d7d1e13a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 23 Feb 2020 00:41:55 +0100 Subject: [PATCH] csi: delete all sixels on the 'alt' grid when switching back to 'normal' --- csi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/csi.c b/csi.c index 38d017f5..ea2b97e6 100644 --- a/csi.c +++ b/csi.c @@ -1151,6 +1151,14 @@ csi_dispatch(struct terminal *term, uint8_t final) tll_free(term->alt.damage); tll_free(term->alt.scroll_damage); + /* Delete all sixel images on the alt screen */ + tll_foreach(term->sixel_images, it) { + if (it->item.grid == &term->alt) { + sixel_destroy(&it->item); + tll_remove(term->sixel_images, it); + } + } + term_damage_all(term); } break;