diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-02-22 09:49:00 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-02-22 09:49:00 +0000 |
| commit | 87193ff339df0e9808ef438239bfa84b4dcf1b7c (patch) | |
| tree | e17288f084bd6b27f5af48032e2a7c567e867617 | |
| parent | term: free sixel images on reset (diff) | |
sixel: raster: only resize image buffer if necessary
| -rw-r--r-- | sixel.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) { |
