diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-02-16 12:56:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-02-16 12:56:02 +0000 |
commit | a665d094b9239b4cc32cffd311a547daa59be872 (patch) | |
tree | d4f3c4addac94f6b510902b5f4e8393fe46f385e /usr.bin/tmux/tty.c | |
parent | 54336c124e82bc2a63c30bb7f253b32fc8a7307e (diff) |
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. */ |