mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
sixel: ensure 'start' row is not outside the grid row range
This commit is contained in:
parent
95f7c5586c
commit
afa9ac0cfc
1 changed files with 3 additions and 1 deletions
4
sixel.c
4
sixel.c
|
|
@ -143,7 +143,9 @@ sixel_unhook(struct terminal *term)
|
|||
.height = term->sixel.image.height,
|
||||
.rows = (term->sixel.image.height + term->cell_height - 1) / term->cell_height,
|
||||
.grid = term->grid,
|
||||
.pos = (struct coord){term->cursor.point.col, term->grid->offset + term->cursor.point.row},
|
||||
.pos = (struct coord){
|
||||
term->cursor.point.col,
|
||||
(term->grid->offset + term->cursor.point.row) & (term->grid->num_rows - 1)},
|
||||
};
|
||||
|
||||
LOG_DBG("generating %dx%d pixman image", image.width, image.height);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue