diff options
author | 2017-08-21 21:01:21 +0000 | |
---|---|---|
committer | 2017-08-21 21:01:21 +0000 | |
commit | d1899db8fd7c6917fc8382d2abbfe0b9a3b3da5d (patch) | |
tree | f544bb58ef8e762fe7cae3008db74a788a59365e /usr.bin/tmux/tty.c | |
parent | add basedir of the kernel link-kit (diff) | |
download | wireguard-openbsd-d1899db8fd7c6917fc8382d2abbfe0b9a3b3da5d.tar.xz wireguard-openbsd-d1899db8fd7c6917fc8382d2abbfe0b9a3b3da5d.zip |
Do not emit \r\n to move to column 0 if there are margins, because it
will instead move to the margin left.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 829316708ab..40808279423 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.292 2017/07/21 22:55:45 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.293 2017/08/21 21:01:21 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1609,7 +1609,8 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy) } /* Zero on the next line. */ - if (cx == 0 && cy == thisy + 1 && thisy != tty->rlower) { + if (cx == 0 && cy == thisy + 1 && thisy != tty->rlower && + (!tty_use_margin(tty) || tty->rleft == 0)) { tty_putc(tty, '\r'); tty_putc(tty, '\n'); goto out; |