diff options
author | 2020-04-17 22:16:28 +0000 | |
---|---|---|
committer | 2020-04-17 22:16:28 +0000 | |
commit | ebfd2033e309985d02ed10df3d5625fa61019608 (patch) | |
tree | ef0957d02eb0733488b34b82e423819d8dc16fe9 /usr.bin/tmux/tty.c | |
parent | Do not move the cursor to the existing y position if it is invalid, go (diff) | |
download | wireguard-openbsd-ebfd2033e309985d02ed10df3d5625fa61019608.tar.xz wireguard-openbsd-ebfd2033e309985d02ed10df3d5625fa61019608.zip |
Set mode properly before and after redrawing, and don't bother
calculating cursor position if it won't be used.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r-- | usr.bin/tmux/tty.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 7347759078c..34961d01f47 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.353 2020/04/17 21:33:18 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.354 2020/04/17 22:16:28 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -2151,6 +2151,9 @@ tty_cursor(struct tty *tty, u_int cx, u_int cy) u_int thisx, thisy; int change; + if (tty->flags & TTY_BLOCK) + return; + if (cx > tty->sx - 1) cx = tty->sx - 1; |