aboutsummaryrefslogtreecommitdiff
path: root/screen-redraw.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2018-08-20 20:05:34 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2018-08-20 20:05:34 +0100
commit9f39470b382481f9ec0d9eb17d196a753ecf8e33 (patch)
tree799d95b4ac052968a92a4dea4a3a1b62c12b3952 /screen-redraw.c
parent458b4b77014361c1df05a84b81e3318aeb19e6cd (diff)
downloadrtmux-9f39470b382481f9ec0d9eb17d196a753ecf8e33.tar.gz
rtmux-9f39470b382481f9ec0d9eb17d196a753ecf8e33.tar.bz2
rtmux-9f39470b382481f9ec0d9eb17d196a753ecf8e33.zip
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.
Diffstat (limited to 'screen-redraw.c')
-rw-r--r--screen-redraw.c4
1 files changed, 3 insertions, 1 deletions
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");