Only screen-redraw.c needs to adjust for message or prompt when the

status line is off, get rid of tty_status_lines and just pass the
client into status_line_size so it can check the CLIENT_STATUSOFF flag
as well.
This commit is contained in:
Nicholas Marriott
2018-08-20 20:05:34 +01:00
parent 458b4b7701
commit 9f39470b38
6 changed files with 33 additions and 44 deletions

View File

@ -411,7 +411,9 @@ screen_redraw_set_context(struct client *c, struct screen_redraw_ctx *ctx)
memset(ctx, 0, sizeof *ctx);
ctx->c = c;
ctx->lines = tty_status_lines(&c->tty);
ctx->lines = status_line_size(c);
if (c->message_string != NULL || c->prompt_string != NULL)
ctx->lines = (ctx->lines == 0) ? 1 : ctx->lines;
if (ctx->lines != 0 && options_get_number(oo, "status-position") == 0)
ctx->top = 1;
ctx->pane_status = options_get_number(wo, "pane-border-status");