diff options
author | 2017-02-16 12:56:01 +0000 | |
---|---|---|
committer | 2017-02-16 12:56:01 +0000 | |
commit | 62b14b228e98e231c49d970a5affd2f99ee55a0d (patch) | |
tree | a4264644770831e94e0b5db89b127c57271bb45b /usr.bin/tmux/tty.c | |
parent | Handle insert cells when cursor at edge of screen correctly, and do a (diff) | |
download | wireguard-openbsd-62b14b228e98e231c49d970a5affd2f99ee55a0d.tar.xz wireguard-openbsd-62b14b228e98e231c49d970a5affd2f99ee55a0d.zip |
There are buggy terminals out there that do not move the cursor to 0,0
after CSR, so invalidate the cursor position rather than assuming 0,0.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 9285a2eacf9..8ea79b50d2e 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.248 2017/02/15 11:22:13 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.249 2017/02/16 12:56:01 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1321,7 +1321,7 @@ tty_region(struct tty *tty, u_int rupper, u_int rlower) tty_cursor(tty, 0, tty->cy); tty_putcode2(tty, TTYC_CSR, tty->rupper, tty->rlower); - tty->cx = tty->cy = 0; + tty->cx = tty->cy = UINT_MAX; } /* Turn off margin. */ @@ -1359,7 +1359,7 @@ tty_margin(struct tty *tty, u_int rleft, u_int rright) else snprintf(s, sizeof s, "\033[%u;%us", rleft + 1, rright + 1); tty_puts(tty, s); - tty->cx = tty->cy = 0; + tty->cx = tty->cy = UINT_MAX; } /* Move cursor inside pane. */ |