diff options
author | nicm <nicm> | 2018-03-16 15:15:39 +0000 |
---|---|---|
committer | nicm <nicm> | 2018-03-16 15:15:39 +0000 |
commit | f87d80737ebeffa302f3e0f9ea2efab98d747825 (patch) | |
tree | b4d9487c46fa1581ee982f9c20d5c81aeeedc579 /cmd-split-window.c | |
parent | 19f3a5c6120c5d845eb942e67413c03c0c008a87 (diff) | |
download | rtmux-f87d80737ebeffa302f3e0f9ea2efab98d747825.tar.gz rtmux-f87d80737ebeffa302f3e0f9ea2efab98d747825.tar.bz2 rtmux-f87d80737ebeffa302f3e0f9ea2efab98d747825.zip |
Insert full size panes at the right position, from KOIE Hidetaka in
GitHub issue 1284.
Diffstat (limited to 'cmd-split-window.c')
-rw-r--r-- | cmd-split-window.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd-split-window.c b/cmd-split-window.c index b75eaa6f..ab7f9bc5 100644 --- a/cmd-split-window.c +++ b/cmd-split-window.c @@ -64,7 +64,7 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) const char *cmd, *path, *shell, *template, *tmp; char **argv, *cause, *new_cause, *cp, *cwd; u_int hlimit; - int argc, size, percentage; + int argc, size, percentage, before; enum layout_type type; struct layout_cell *lc; struct environ_entry *envent; @@ -96,6 +96,7 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) type = LAYOUT_TOPBOTTOM; if (args_has(args, 'h')) type = LAYOUT_LEFTRIGHT; + before = args_has(args, 'b'); size = -1; if (args_has(args, 'l')) { @@ -125,13 +126,12 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) if (*shell == '\0' || areshell(shell)) shell = _PATH_BSHELL; - lc = layout_split_pane(wp, type, size, args_has(args, 'b'), - args_has(args, 'f')); + lc = layout_split_pane(wp, type, size, before, args_has(args, 'f')); if (lc == NULL) { cause = xstrdup("pane too small"); goto error; } - new_wp = window_add_pane(w, wp, args_has(args, 'b'), hlimit); + new_wp = window_add_pane(w, wp, before, args_has(args, 'f'), hlimit); layout_make_leaf(lc, new_wp); path = NULL; |