aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-10-04 11:13:40 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-10-09 05:44:16 +0000
commit47298776dcd25fb82b16a69bd67c268289776932 (patch)
tree90e16c1e41c24effc03f433a02542822b3aa13da
parentsixel: implement reflow (diff)
sixel: unhook: only call render_refresh() once
-rw-r--r--sixel.c5
1 files 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