From 1563fecc2040b6cbc622e5d0da6b7837fde768a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 26 Feb 2021 14:20:00 +0100 Subject: [PATCH] =?UTF-8?q?sixel:=20don=E2=80=99t=20go=20past=20the=20bott?= =?UTF-8?q?om=20scroll=20margin=20when=20sixel=20scrolling=20is=20disabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- sixel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;