diff options
author | 2017-02-07 18:27:46 +0000 | |
---|---|---|
committer | 2017-02-07 18:27:46 +0000 | |
commit | e3cdbf99ded0cf8a1df3ef42313236d2f9ddc061 (patch) | |
tree | 3ece26404e286fa83c84e284c9f8915e08c971a5 /usr.bin/tmux/tty.c | |
parent | IPsec packets could be dropped unaccounted if output after crypto (diff) | |
download | wireguard-openbsd-e3cdbf99ded0cf8a1df3ef42313236d2f9ddc061.tar.xz wireguard-openbsd-e3cdbf99ded0cf8a1df3ef42313236d2f9ddc061.zip |
Do not clear the scroll region, instead set it to the scroll region we
actually want.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index e10fe83d575..cf721449ca5 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.231 2017/02/07 17:13:28 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.232 2017/02/07 18:27:46 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1356,13 +1356,15 @@ tty_margin(struct tty *tty, u_int rleft, u_int rright) if (tty->rleft == rleft && tty->rright == rright) return; - tty->rupper = 0; - tty->rlower = tty->sy - 1; + tty_putcode2(tty, TTYC_CSR, tty->rupper, tty->rlower); tty->rleft = rleft; tty->rright = rright; - snprintf(s, sizeof s, "\033[r\033[%u;%us", rleft + 1, rright + 1); + if (rleft == 0 && rright == tty->sx - 1) + snprintf(s, sizeof s, "\033[s"); + else + snprintf(s, sizeof s, "\033[%u;%us", rleft + 1, rright + 1); tty_puts(tty, s); tty->cx = tty->cy = 0; } |