diff options
author | 2019-11-14 07:56:32 +0000 | |
---|---|---|
committer | 2019-11-14 07:56:32 +0000 | |
commit | fb494601a26d888355511d776bf2a5ec65b511b1 (patch) | |
tree | 4ac7d35afea90bf8834d6f4f76ddbc68da183922 | |
parent | Add an option to set the key sent by backspace for those whose system (diff) | |
download | wireguard-openbsd-fb494601a26d888355511d776bf2a5ec65b511b1.tar.xz wireguard-openbsd-fb494601a26d888355511d776bf2a5ec65b511b1.zip |
CUB and CUF are also limited by the margins so use CUP instead when
margins are enabled (we already do this for linefeed).
-rw-r--r-- | usr.bin/tmux/tty.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index cd8d5f47bf2..81d29e0036b 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.332 2019/09/19 08:56:37 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.333 2019/11/14 07:56:32 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -2106,7 +2106,9 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy) if ((u_int) abs(change) > cx && tty_term_has(term, TTYC_HPA)) { tty_putcode1(tty, TTYC_HPA, cx); goto out; - } else if (change > 0 && tty_term_has(term, TTYC_CUB)) { + } else if (change > 0 && + tty_term_has(term, TTYC_CUB) && + !tty_use_margin(tty)) { if (change == 2 && tty_term_has(term, TTYC_CUB1)) { tty_putcode(tty, TTYC_CUB1); tty_putcode(tty, TTYC_CUB1); @@ -2114,7 +2116,9 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy) } tty_putcode1(tty, TTYC_CUB, change); goto out; - } else if (change < 0 && tty_term_has(term, TTYC_CUF)) { + } else if (change < 0 && + tty_term_has(term, TTYC_CUF) && + !tty_use_margin(tty)) { tty_putcode1(tty, TTYC_CUF, -change); goto out; } |