From 47298776dcd25fb82b16a69bd67c268289776932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 4 Oct 2020 13:13:40 +0200 Subject: [PATCH] sixel: unhook: only call render_refresh() once --- sixel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sixel.c b/sixel.c index 52eaa406..0d69e658 100644 --- a/sixel.c +++ b/sixel.c @@ -618,11 +618,10 @@ sixel_unhook(struct terminal *term) image.width, image.height, img_data, stride); - + /* Allocate space *first*, then insert */ for (size_t i = 0; i < image.rows; i++) term_linefeed(term); term_carriage_return(term); - render_refresh(term); sixel_insert(term, image); @@ -635,6 +634,8 @@ sixel_unhook(struct terminal *term) term->sixel.image.height = 0; term->sixel.max_col = 0; term->sixel.pos = (struct coord){0, 0}; + + render_refresh(term); } static unsigned