diff options
author | nicm <nicm> | 2022-02-03 11:06:11 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-04-06 14:19:49 +0100 |
commit | 921be619303fdad6db3c46662fc0cde2903c9535 (patch) | |
tree | 8849868a958f94f7039f296ccd7171cf7b839562 /cmd-resize-pane.c | |
parent | 53ee4f0334b61192a4c92a5327d849fb688386e9 (diff) | |
download | rtmux-921be619303fdad6db3c46662fc0cde2903c9535.tar.gz rtmux-921be619303fdad6db3c46662fc0cde2903c9535.tar.bz2 rtmux-921be619303fdad6db3c46662fc0cde2903c9535.zip |
Adjust size given to resize-pane for pane status line, GitHub issue
3050.
Diffstat (limited to 'cmd-resize-pane.c')
-rw-r--r-- | cmd-resize-pane.c | 13 |
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); } |