summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-10-10 10:36:47 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-10-10 10:36:47 +0000
commitcb36f44f92411a65728848159782878a9fe5f61b (patch)
tree8a971d644b956dfc36dc02a29a2c2b1e3c2353d8 /usr.bin/tmux/tty.c
parent1a7d94b31f73fd2780347ed40c36a275984d82f5 (diff)
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 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index b3deaa38dc9..c4adaa9ece7 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.36 2009/10/09 07:33:12 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.37 2009/10/10 10:36:46 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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');
}