summaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
authornicm <nicm>2018-09-24 15:29:56 +0000
committernicm <nicm>2018-09-24 15:29:56 +0000
commit7bc6c105b7565441e8b32f4f77099cb5c3274611 (patch)
tree97f6834551de479a6dbb811b0fa5d4f53d475d35 /layout.c
parentbe2201200f21c074b35c9c31034b7bdf6cd76721 (diff)
Only include pane status in minimum size if it is turned on, GitHub
issue 1480.
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/layout.c b/layout.c
index e1112ffa..4ad645e0 100644
--- a/layout.c
+++ b/layout.c
@@ -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;