From 9f39470b382481f9ec0d9eb17d196a753ecf8e33 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 20 Aug 2018 20:05:34 +0100 Subject: 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. --- screen-redraw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'screen-redraw.c') diff --git a/screen-redraw.c b/screen-redraw.c index 118830c7..50862f9e 100644 --- a/screen-redraw.c +++ b/screen-redraw.c @@ -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"); -- cgit