aboutsummaryrefslogtreecommitdiff
path: root/sixel.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-06-29 20:03:26 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-06-29 20:03:26 +0000
commitfad5838dbaba327ea16496bbe768056b10041897 (patch)
tree53a4cd6d93af11103fc8e78f09341397b3b28ca4 /sixel.c
parentscroll: destroy scrolled out sixels before scroll is applied (diff)
parentsixel: destroy all sixels when font size is decreased (diff)
Merge branch 'master' into sixel-performance
Diffstat (limited to 'sixel.c')
-rw-r--r--sixel.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sixel.c b/sixel.c
index 5973e097..0a28defd 100644
--- a/sixel.c
+++ b/sixel.c
@@ -66,6 +66,17 @@ sixel_destroy(struct sixel *sixel)
sixel->data = NULL;
}
+void
+sixel_destroy_all(struct terminal *term)
+{
+ tll_foreach(term->normal.sixel_images, it)
+ sixel_destroy(&it->item);
+ tll_foreach(term->alt.sixel_images, it)
+ sixel_destroy(&it->item);
+ tll_free(term->normal.sixel_images);
+ tll_free(term->alt.sixel_images);
+}
+
static void
sixel_erase(struct terminal *term, struct sixel *sixel)
{