summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/resize.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-05-11 06:34:56 +0000
committernicm <nicm@openbsd.org>2019-05-11 06:34:56 +0000
commitf415a97b3a864f74314bccb34bb1c01a93759f6b (patch)
tree51ec40d94af26b707cab25b68868e0f438408d8b /usr.bin/tmux/resize.c
parentRefactor efiboot into 32 and 64 bit copies. (diff)
downloadwireguard-openbsd-f415a97b3a864f74314bccb34bb1c01a93759f6b.tar.xz
wireguard-openbsd-f415a97b3a864f74314bccb34bb1c01a93759f6b.zip
Do not reduce window height by status line height for control mode
clients, from George Nachman.
Diffstat (limited to 'usr.bin/tmux/resize.c')
-rw-r--r--usr.bin/tmux/resize.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/tmux/resize.c b/usr.bin/tmux/resize.c
index d3411b23153..c1f88eb3146 100644
--- a/usr.bin/tmux/resize.c
+++ b/usr.bin/tmux/resize.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resize.c,v 1.31 2019/04/17 14:43:49 nicm Exp $ */
+/* $OpenBSD: resize.c,v 1.32 2019/05/11 06:34:56 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -174,11 +174,12 @@ recalculate_sizes(void)
TAILQ_FOREACH(c, &clients, entry) {
if (ignore_client_size(c))
continue;
- if (c->tty.sy <= status_line_size(c))
+ s = c->session;
+ if (c->tty.sy <= s->statuslines || (c->flags & CLIENT_CONTROL))
c->flags |= CLIENT_STATUSOFF;
else
c->flags &= ~CLIENT_STATUSOFF;
- c->session->attached++;
+ s->attached++;
}
/* Walk each window and adjust the size. */