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.
This commit is contained in:
Nicholas Marriott
2009-10-20 16:32:23 +00:00
parent d1e6388fed
commit 387f4d42cc
2 changed files with 15 additions and 21 deletions

8
tty.c
View File

@ -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);