diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-10-20 16:32:23 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-10-20 16:32:23 +0000 |
commit | 387f4d42ccfb9aab1b8d5f10176dac2a3209c3fa (patch) | |
tree | 302f88480c1fb0d36771466543e13ae9b535da4c /tty.c | |
parent | d1e6388fedbf0be5018320ceae680d323424dc13 (diff) | |
download | rtmux-387f4d42ccfb9aab1b8d5f10176dac2a3209c3fa.tar.gz rtmux-387f4d42ccfb9aab1b8d5f10176dac2a3209c3fa.tar.bz2 rtmux-387f4d42ccfb9aab1b8d5f10176dac2a3209c3fa.zip |
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.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); |