aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-02-26 13:20:00 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-26 13:20:00 +0000
commit1563fecc2040b6cbc622e5d0da6b7837fde768a9 (patch)
treedcfac9d1aeea1787870f23f6722fdce06acfc9c7
parentsixel: implement private mode 80 - sixel scrolling (diff)
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.
-rw-r--r--sixel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sixel.c b/sixel.c
index 06246203..ecc6d141 100644
--- a/sixel.c
+++ b/sixel.c
@@ -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;