diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-02-24 17:39:58 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-02-24 17:42:46 +0000 |
| commit | afa9ac0cfc05ac58b4cb03f88cab7069fd137266 (patch) | |
| tree | 31c31d125d263931d4eb077e1acfd9be9ae86bd3 | |
| parent | sixel: add sixel_delete_at_row and sixel_delete_in_range (diff) | |
sixel: ensure 'start' row is not outside the grid row range
| -rw-r--r-- | sixel.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |
