From 5a93fc30ca035658268c6bb5e6a4527ebd60b76d Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 6 Mar 2021 21:18:43 +0100 Subject: sixel: add: simplify check for resize needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the image height is always a multiple of 6, there’s no need to round up the image height. --- sixel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sixel.c b/sixel.c index 7cc9f63c..115d2139 100644 --- a/sixel.c +++ b/sixel.c @@ -906,7 +906,7 @@ sixel_add(struct terminal *term, uint32_t color, uint8_t sixel) } if (term->sixel.pos.col >= term->sixel.image.width || - term->sixel.pos.row + 5 >= (term->sixel.image.height + 6 - 1) / 6 * 6) + term->sixel.pos.row >= term->sixel.image.height) { int width = max( term->sixel.image.width, -- cgit v1.3