From 63140a68f516c8b4616bf6c726d23a75b73e5713 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 22 Feb 2020 00:05:25 +0100 Subject: sixel: calculate image height in (cell) rows --- terminal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index b80b9898..c6c349c3 100644 --- a/terminal.c +++ b/terminal.c @@ -1601,8 +1601,7 @@ term_scroll_reverse_partial(struct terminal *term, /* TODO: untested */ - int img_rows = (it->item.height + term->cell_height - 1) / term->cell_height; - int img_bottom_row = (it->item.pos.row + img_rows) & (term->grid->num_rows - 1); + int img_bottom_row = (it->item.pos.row + it->item.rows) & (term->grid->num_rows - 1); int new_row = (term->grid->offset + r) & (term->grid->num_rows - 1); if (img_bottom_row == new_row) { -- cgit v1.3