From da76b8cbf85cdfd3caaf95e469db86a7bc1a2b64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 22 Feb 2020 00:10:42 +0100 Subject: [PATCH] sixel: ugly hack to remove over-written sixel images --- sixel.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sixel.c b/sixel.c index 0cfb2a24..240754f7 100644 --- a/sixel.c +++ b/sixel.c @@ -66,6 +66,14 @@ sixel_unhook(struct terminal *term) term->sixel.image, IMAGE_WIDTH * sizeof(uint32_t)); + tll_foreach(term->sixel_images, it) { + if (it->item.pos.row == image.pos.row) { + pixman_image_unref(it->item.pix); + free(it->item.data); + tll_remove(term->sixel_images, it); + } + } + tll_push_back(term->sixel_images, image); term->sixel.image = NULL;