aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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