aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-10-23 17:11:26 +0000
committerTiago Cunha <tcunha@gmx.com>2009-10-23 17:11:26 +0000
commit97e02eae7d86c3c5b5c8610d3bd48c0fa1d0398e (patch)
tree943e6389e900ea632ce7efcf8701727ebac5bfc0 /tty.c
parent516bfe7ba39f305c771c7cc984f043d0101b8bce (diff)
downloadrtmux-97e02eae7d86c3c5b5c8610d3bd48c0fa1d0398e.tar.gz
rtmux-97e02eae7d86c3c5b5c8610d3bd48c0fa1d0398e.tar.bz2
rtmux-97e02eae7d86c3c5b5c8610d3bd48c0fa1d0398e.zip
Sync OpenBSD patchset 419:
Move the check for whether to force a line wrapper lower down into the tty code where it has access to the tty width, which is what should have been checked.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tty.c b/tty.c
index 609f7a45..edf62698 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.155 2009-10-23 17:08:30 tcunha Exp $ */
+/* $Id: tty.c,v 1.156 2009-10-23 17:11:26 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -718,6 +718,14 @@ tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx)
return;
}
+ /*
+ * If this line wrapped naturally (ctx->num is nonzero), don't do
+ * anything - the cursor can just be moved to the last cell and wrap
+ * naturally.
+ */
+ if (ctx->num && !(tty->term->flags & TERM_EARLYWRAP))
+ return;
+
if (ctx->ocy == ctx->orlower) {
tty_reset(tty);