From: nicm Date: Wed, 27 Dec 2017 13:55:42 +0000 (+0000) Subject: Draw command prompt correctly with status line off. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8ff11a1cbee08f56c90b7895cf36aea620bee47e;p=openbsd Draw command prompt correctly with status line off. --- 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);