aboutsummaryrefslogtreecommitdiff
path: root/sixel.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-22 09:49:00 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-22 09:49:00 +0000
commit87193ff339df0e9808ef438239bfa84b4dcf1b7c (patch)
treee17288f084bd6b27f5af48032e2a7c567e867617 /sixel.c
parentterm: free sixel images on reset (diff)
sixel: raster: only resize image buffer if necessary
Diffstat (limited to 'sixel.c')
-rw-r--r--sixel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sixel.c b/sixel.c
index b3bbdb65..cfef67f3 100644
--- a/sixel.c
+++ b/sixel.c
@@ -260,7 +260,9 @@ sixel_raster(struct terminal *term, uint8_t c)
LOG_DBG("pan=%u, pad=%u (aspect ratio = %u), size=%ux%u",
pan, pad, pan / pad, ph, pv);
- resize(term, ph, pv);
+
+ if (ph >= term->sixel.image.height && pv >= term->sixel.image.width)
+ resize(term, ph, pv);
}
switch (c) {