There is no point setting the scroll region up for line feeds unless scrolling

is actually going to happen, so don't.
This commit is contained in:
Nicholas Marriott 2009-10-10 10:36:46 +00:00
parent 9dd72b9583
commit 3a20a05a49

5
tty.c
View File

@ -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');
}