sixel: add: simplify check for resize needed

Since the image height is always a multiple of 6, there’s no need to
round up the image height.
This commit is contained in:
Daniel Eklöf 2021-03-06 21:18:43 +01:00
parent e94f108572
commit 5a93fc30ca
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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,