summaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--usr.bin/tmux/resize.c7
-rw-r--r--usr.bin/tmux/status.c6
2 files changed, 7 insertions, 6 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. */
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index fc638f208f1..128924d0338 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.197 2019/05/03 10:00:48 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.198 2019/05/11 06:34:56 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -203,7 +203,7 @@ status_at_line(struct client *c)
{
struct session *s = c->session;
- if (c->flags & CLIENT_STATUSOFF)
+ if (c->flags & (CLIENT_STATUSOFF|CLIENT_CONTROL))
return (-1);
if (s->statusat != 1)
return (s->statusat);
@@ -216,7 +216,7 @@ status_line_size(struct client *c)
{
struct session *s = c->session;
- if (c->flags & CLIENT_STATUSOFF)
+ if (c->flags & (CLIENT_STATUSOFF|CLIENT_CONTROL))
return (0);
return (s->statuslines);
}