summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2018-09-24 15:29:57 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2018-09-24 15:29:57 +0000
commit5e85f2b6d4d448a1b04c9c07639a4259e1d182ca (patch)
treef59422a91bcc104e3e8452590c6e757619d94ce5 /usr.bin
parent6ab929741c8dbbfdf4e844842ea20829f7a87a15 (diff)
Only include pane status in minimum size if it is turned on, GitHub
issue 1480.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/layout.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/tmux/layout.c b/usr.bin/tmux/layout.c
index a0b81b52f83..d88b010d7a3 100644
--- a/usr.bin/tmux/layout.c
+++ b/usr.bin/tmux/layout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: layout.c,v 1.36 2018/06/08 20:54:22 nicm Exp $ */
+/* $OpenBSD: layout.c,v 1.37 2018/09/24 15:29:56 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -236,7 +236,7 @@ layout_need_status(struct layout_cell *lc, int at_top)
{
struct layout_cell *first_lc;
- if (lc->parent) {
+ if (lc->parent != NULL) {
if (lc->parent->type == LAYOUT_LEFTRIGHT)
return (layout_need_status(lc->parent, at_top));
@@ -349,7 +349,9 @@ layout_resize_check(struct window *w, struct layout_cell *lc,
{
struct layout_cell *lcchild;
u_int available, minimum;
+ int status;
+ status = options_get_number(w->options, "pane-border-status");
if (lc->type == LAYOUT_WINDOWPANE) {
/* Space available in this cell only. */
minimum = PANE_MINIMUM;
@@ -357,9 +359,8 @@ layout_resize_check(struct window *w, struct layout_cell *lc,
available = lc->sx;
else {
available = lc->sy;
- minimum += layout_need_status(lc,
- options_get_number(w->options,
- "pane-border-status") == 1);
+ if (status != 0)
+ minimum += layout_need_status(lc, status == 1);
}
if (available > minimum)
available -= minimum;