sixel: calculate image height in (cell) rows

This commit is contained in:
Daniel Eklöf 2020-02-22 00:05:25 +01:00
parent 564e8909f4
commit 63140a68f5
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 25 additions and 23 deletions

View file

@ -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) {