/* Now position */
x = p->parent->w/2 - w/2 - 1;
y = p->parent->h/2 - h/2 - 1;
- if (strchr(style, 'T')) { y = 0; h -= 1; }
- if (strchr(style, 'B')) { h -= 1; y = p->parent->h - h; }
+ if (strchr(style, 'T')) { y = 0; h -= lh; }
+ if (strchr(style, 'B')) { h -= lh; y = p->parent->h - h; }
if (strchr(style, 'L')) x = 0;
if (strchr(style, 'R')) x = p->parent->w - w;
pane_resize(p, x, y, w, h);
vd->border_width = cr.x;
vd->ascent = cr.i;
- if (p->h < vd->border_height * 3) {
+ if (p->h < vd->border_height * 3 &&
+ (vd->border & (BORDER_TOP|BORDER_BOT)) ==
+ (BORDER_TOP|BORDER_BOT)) {
vd->border &= ~BORDER_TOP;
vd->border &= ~BORDER_BOT;
}
- if (p->w < vd->border_width * 3) {
+ if (p->w < vd->border_width * 3 &&
+ (vd->border & (BORDER_LEFT|BORDER_RIGHT)) ==
+ (BORDER_LEFT|BORDER_RIGHT)) {
vd->border &= ~BORDER_LEFT;
vd->border &= ~BORDER_RIGHT;
}
+
}
if (vd->border & BORDER_LEFT) {