summaryrefslogtreecommitdiffstats
path: root/cmd-break-pane.c
diff options
context:
space:
mode:
authornicm <nicm>2020-05-26 09:01:03 +0000
committernicm <nicm>2020-05-26 09:01:03 +0000
commit392b381d1cec6d63c4baaa709243f760ff6c3403 (patch)
tree1299383ee52f55f84bff97cef3235636ce301ea5 /cmd-break-pane.c
parent370f0bb98d81133e2d9c5d3d4e1aa2e7c69dfc3e (diff)
Apply -n when only one pane in the window.
Diffstat (limited to 'cmd-break-pane.c')
-rw-r--r--cmd-break-pane.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd-break-pane.c b/cmd-break-pane.c
index 9483aa7e..6d5041e8 100644
--- a/cmd-break-pane.c
+++ b/cmd-break-pane.c
@@ -80,6 +80,10 @@ cmd_break_pane_exec(struct cmd *self, struct cmdq_item *item)
free(cause);
return (CMD_RETURN_ERROR);
}
+ if (args_has(args, 'n')) {
+ window_set_name(w, args_get(args, 'n'));
+ options_set_number(w->options, "automatic-rename", 0);
+ }
server_unlink_window(src_s, wl);
return (CMD_RETURN_NORMAL);
}