sixel: don’t go past the bottom scroll margin when sixel scrolling is disabled

When sixel scrolling is disabled (private mode 80 is off), and scroll
margins have been set, XTerm seems to ignore the top margin (sixel
still begins at (0,0)), but does not go past the bottom margin.

This patch implements the same behavior in foot.
This commit is contained in:
Daniel Eklöf 2021-02-26 14:20:00 +01:00
parent 849427bf10
commit 1563fecc20
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -724,7 +724,7 @@ sixel_unhook(struct terminal *term)
* When disabled, only the number of screen rows may be used. */
int rows_avail = do_scroll
? (term->sixel.image.height + term->cell_height - 1) / term->cell_height
: term->rows;
: term->scroll_region.end;
/* Initial sixel coordinates */
int start_row = do_scroll ? term->grid->cursor.point.row : 0;