aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-10-10 10:36:46 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-10-10 10:36:46 +0000
commit3a20a05a49bdf7cfd7d2131c6f31a2ebf76ad4e5 (patch)
tree3ed4e1a3ff93139209981044864620684f539e88 /tty.c
parent9dd72b958366c44b6d62680836983c58d2a0a42f (diff)
downloadrtmux-3a20a05a49bdf7cfd7d2131c6f31a2ebf76ad4e5.tar.gz
rtmux-3a20a05a49bdf7cfd7d2131c6f31a2ebf76ad4e5.tar.bz2
rtmux-3a20a05a49bdf7cfd7d2131c6f31a2ebf76ad4e5.zip
There is no point setting the scroll region up for line feeds unless scrolling
is actually going to happen, so don't.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c5
1 files 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');
}