From 8ff11a1cbee08f56c90b7895cf36aea620bee47e Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 27 Dec 2017 13:55:42 +0000 Subject: [PATCH] Draw command prompt correctly with status line off. --- usr.bin/tmux/status.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index 2d0d652e2f8..12a9ebe4df0 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.172 2017/12/18 12:39:34 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.173 2017/12/27 13:55:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -659,9 +659,10 @@ status_message_redraw(struct client *c) memcpy(&old_status, &c->status, sizeof old_status); lines = status_line_size(c->session); - if (lines <= 1) + if (lines <= 1) { + lines = 1; screen_init(&c->status, c->tty.sx, 1, 0); - else + } else screen_init(&c->status, c->tty.sx, lines, 0); len = screen_write_strlen("%s", c->message_string); @@ -811,9 +812,10 @@ status_prompt_redraw(struct client *c) memcpy(&old_status, &c->status, sizeof old_status); lines = status_line_size(c->session); - if (lines <= 1) + if (lines <= 1) { + lines = 1; screen_init(&c->status, c->tty.sx, 1, 0); - else + } else screen_init(&c->status, c->tty.sx, lines, 0); len = screen_write_strlen("%s", c->prompt_string); -- 2.20.1