aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authornicm <nicm>2020-04-17 22:16:28 +0000
committernicm <nicm>2020-04-17 22:16:28 +0000
commita7a9460d2790161f7bb60c4047acf32d3aa93ed9 (patch)
tree28e41a1116bfb1442a6cd405ad013564fb95d463 /tty.c
parenta877a5d8c96f317cb8c496f0c9afa0304be926a6 (diff)
downloadrtmux-a7a9460d2790161f7bb60c4047acf32d3aa93ed9.tar.gz
rtmux-a7a9460d2790161f7bb60c4047acf32d3aa93ed9.tar.bz2
rtmux-a7a9460d2790161f7bb60c4047acf32d3aa93ed9.zip
Set mode properly before and after redrawing, and don't bother
calculating cursor position if it won't be used.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tty.c b/tty.c
index 9c03c08a..82436959 100644
--- a/tty.c
+++ b/tty.c
@@ -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;