aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-21 23:10:42 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-21 23:10:42 +0000
commitda76b8cbf85cdfd3caaf95e469db86a7bc1a2b64 (patch)
tree6cd516ccfa627e510faff7d9add37353d7e30226
parentsixel: calculate image height in (cell) rows (diff)
sixel: ugly hack to remove over-written sixel images
-rw-r--r--sixel.c8
1 files changed, 8 insertions, 0 deletions
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;