aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-10-11 23:39:37 +0000
committerTiago Cunha <tcunha@gmx.com>2009-10-11 23:39:37 +0000
commit2486a36af3e7b738468a1acbe6c868314a26ab33 (patch)
treea79049ce89b23f2838d4ff859bb0ea605ea8bb0c
parent6a1ebb11df452e570b430ba16192c38b0e3a0f90 (diff)
downloadrtmux-2486a36af3e7b738468a1acbe6c868314a26ab33.tar.gz
rtmux-2486a36af3e7b738468a1acbe6c868314a26ab33.tar.bz2
rtmux-2486a36af3e7b738468a1acbe6c868314a26ab33.zip
Sync OpenBSD patchset 372:
There is no point setting the scroll region up for line feeds unless scrolling is actually going to happen, so don't.
-rw-r--r--tty.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tty.c b/tty.c
index 03e2882f..8d44adb5 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.140 2009-10-09 13:11:42 tcunha Exp $ */
+/* $Id: tty.c,v 1.141 2009-10-11 23:39:37 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -698,11 +698,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');
}