From 3a20a05a49bdf7cfd7d2131c6f31a2ebf76ad4e5 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 10 Oct 2009 10:36:46 +0000 Subject: [PATCH] There is no point setting the scroll region up for line feeds unless scrolling is actually going to happen, so don't. --- tty.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tty.c b/tty.c index c61fd6b0..7b0454f7 100644 --- a/tty.c +++ b/tty.c @@ -693,11 +693,10 @@ tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx) return; } - tty_reset(tty); - - tty_region(tty, ctx->orupper, ctx->orlower, wp->yoff); if (ctx->ocy == ctx->orlower) { + tty_reset(tty); + tty_region(tty, ctx->orupper, ctx->orlower, wp->yoff); tty_cursor(tty, ctx->ocx, ctx->ocy, wp->xoff, wp->yoff); tty_putc(tty, '\n'); }