summaryrefslogtreecommitdiffstats
path: root/cmd-join-pane.c
diff options
context:
space:
mode:
authornicm <nicm>2019-11-18 09:43:31 +0000
committernicm <nicm>2019-11-18 09:43:31 +0000
commit350a43493952e1f10173b4e341ff1fbd8ed8440d (patch)
tree1a1f8d83831fcdbf7f607171ce54c9e5ea83125d /cmd-join-pane.c
parent4bc445f080ff53268ff1af26564d19c35c17e980 (diff)
Add -f for full size to join-pane (like split-window), from Theo Buehler.
Diffstat (limited to 'cmd-join-pane.c')
-rw-r--r--cmd-join-pane.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/cmd-join-pane.c b/cmd-join-pane.c
index b6eff0fe..5344f3ec 100644
--- a/cmd-join-pane.c
+++ b/cmd-join-pane.c
@@ -36,8 +36,8 @@ const struct cmd_entry cmd_join_pane_entry = {
.name = "join-pane",
.alias = "joinp",
- .args = { "bdhvp:l:s:t:", 0, 0 },
- .usage = "[-bdhv] [-l size] " CMD_SRCDST_PANE_USAGE,
+ .args = { "bdfhvp:l:s:t:", 0, 0 },
+ .usage = "[-bdfhv] [-l size] " CMD_SRCDST_PANE_USAGE,
.source = { 's', CMD_FIND_PANE, CMD_FIND_DEFAULT_MARKED },
.target = { 't', CMD_FIND_PANE, 0 },
@@ -143,10 +143,13 @@ cmd_join_pane_exec(struct cmd *self, struct cmdq_item *item)
else
size = (dst_wp->sx * percentage) / 100;
}
+
+ flags = 0;
if (args_has(args, 'b'))
- flags = SPAWN_BEFORE;
- else
- flags = 0;
+ flags |= SPAWN_BEFORE;
+ if (args_has(args, 'f'))
+ flags |= SPAWN_FULLSIZE;
+
lc = layout_split_pane(dst_wp, type, size, flags);
if (lc == NULL) {
cmdq_error(item, "create pane failed: pane too small");