Do not reduce window height by status line height for control mode

clients, from George Nachman.
pull/1741/head
nicm 2019-05-11 06:34:56 +00:00
parent d62fd78655
commit ad27b7decd
2 changed files with 5 additions and 4 deletions

View File

@ -174,11 +174,12 @@ recalculate_sizes(void)
TAILQ_FOREACH(c, &clients, entry) { TAILQ_FOREACH(c, &clients, entry) {
if (ignore_client_size(c)) if (ignore_client_size(c))
continue; 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; c->flags |= CLIENT_STATUSOFF;
else else
c->flags &= ~CLIENT_STATUSOFF; c->flags &= ~CLIENT_STATUSOFF;
c->session->attached++; s->attached++;
} }
/* Walk each window and adjust the size. */ /* Walk each window and adjust the size. */

View File

@ -203,7 +203,7 @@ status_at_line(struct client *c)
{ {
struct session *s = c->session; struct session *s = c->session;
if (c->flags & CLIENT_STATUSOFF) if (c->flags & (CLIENT_STATUSOFF|CLIENT_CONTROL))
return (-1); return (-1);
if (s->statusat != 1) if (s->statusat != 1)
return (s->statusat); return (s->statusat);
@ -216,7 +216,7 @@ status_line_size(struct client *c)
{ {
struct session *s = c->session; struct session *s = c->session;
if (c->flags & CLIENT_STATUSOFF) if (c->flags & (CLIENT_STATUSOFF|CLIENT_CONTROL))
return (0); return (0);
return (s->statuslines); return (s->statuslines);
} }