summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-04-17 22:16:28 +0000
committernicm <nicm@openbsd.org>2020-04-17 22:16:28 +0000
commitebfd2033e309985d02ed10df3d5625fa61019608 (patch)
treeef0957d02eb0733488b34b82e423819d8dc16fe9 /usr.bin/tmux/tty.c
parentDo not move the cursor to the existing y position if it is invalid, go (diff)
downloadwireguard-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.c5
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;