aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2022-02-03 14:01:11 +0000
committerThomas Adam <thomas@xteddy.org>2022-02-03 14:01:11 +0000
commit784d6a39299bdc6ef40e785561f2f064a7982ca0 (patch)
tree333a9a4fa0d178d5a9b7f2175fb3a9b67f729024
parentc0598e2515cd051dcf9771f6edcf9eb953644227 (diff)
parent3276f0c18473703a734d53495202f50a2c7d6b34 (diff)
downloadrtmux-784d6a39299bdc6ef40e785561f2f064a7982ca0.tar.gz
rtmux-784d6a39299bdc6ef40e785561f2f064a7982ca0.tar.bz2
rtmux-784d6a39299bdc6ef40e785561f2f064a7982ca0.zip
Merge branch 'obsd-master' into master
-rw-r--r--cmd-resize-pane.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/cmd-resize-pane.c b/cmd-resize-pane.c
index 81744f72..c9439441 100644
--- a/cmd-resize-pane.c
+++ b/cmd-resize-pane.c
@@ -60,7 +60,7 @@ cmd_resize_pane_exec(struct cmd *self, struct cmdq_item *item)
const char *errstr;
char *cause;
u_int adjust;
- int x, y;
+ int x, y, status;
struct grid *gd = wp->base.grid;
if (args_has(args, 'T')) {
@@ -121,6 +121,17 @@ cmd_resize_pane_exec(struct cmd *self, struct cmdq_item *item)
free(cause);
return (CMD_RETURN_ERROR);
}
+ status = options_get_number(w->options, "pane-border-status");
+ switch (status) {
+ case PANE_STATUS_TOP:
+ if (y != INT_MAX && wp->yoff == 1)
+ y++;
+ break;
+ case PANE_STATUS_BOTTOM:
+ if (y != INT_MAX && wp->yoff + wp->sy == w->sy - 1)
+ y++;
+ break;
+ }
layout_resize_pane_to(wp, LAYOUT_TOPBOTTOM, y);
}