From 387f4d42ccfb9aab1b8d5f10176dac2a3209c3fa Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 20 Oct 2009 16:32:23 +0000 Subject: 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. --- tty.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tty.c') diff --git a/tty.c b/tty.c index 9f4fbc2e..93d61c0e 100644 --- a/tty.c +++ b/tty.c @@ -713,6 +713,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); -- cgit