From eb14b44413dd2e7bb5040adf252de0e63b53a21f Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Mon, 7 May 2018 20:13:23 +1000 Subject: [PATCH] Use current terminal size in term_reset() Fixes a regression introduced by 70ac43ce779dde926c43e01bf17ceab2e5108df7 where the scroll region would be reset to the original terminal size, not current. --- source/term.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/term.c b/source/term.c index 0337cdb..64e480a 100644 --- a/source/term.c +++ b/source/term.c @@ -708,8 +708,8 @@ void term_putchar (unsigned char c) void term_reset (void) { if (current_term->TI_csr) - tputs_x(tparm2(current_term->TI_csr, 0, current_term->TI_lines - 1)); - term_gotoxy(0, current_term->TI_lines - 1); + tputs_x(tparm2(current_term->TI_csr, 0, current_term->li - 1)); + term_gotoxy(0, current_term->li - 1); #if use_alt_screen if (current_term->TI_rmcup) tputs_x(current_term->TI_rmcup);