diff options
Diffstat (limited to 'usr.bin/tmux/cmd-split-window.c')
-rw-r--r-- | usr.bin/tmux/cmd-split-window.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c index a0ed48dcae7..671fdfb1276 100644 --- a/usr.bin/tmux/cmd-split-window.c +++ b/usr.bin/tmux/cmd-split-window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-split-window.c,v 1.104 2020/05/16 16:20:59 nicm Exp $ */ +/* $OpenBSD: cmd-split-window.c,v 1.105 2021/03/11 06:31:05 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -40,8 +40,8 @@ const struct cmd_entry cmd_split_window_entry = { .name = "split-window", .alias = "splitw", - .args = { "bc:de:fF:hIl:p:Pt:v", 0, -1 }, - .usage = "[-bdefhIPv] [-c start-directory] [-e environment] " + .args = { "bc:de:fF:hIl:p:Pt:vZ", 0, -1 }, + .usage = "[-bdefhIPvZ] [-c start-directory] [-e environment] " "[-F format] [-l size] " CMD_TARGET_PANE_USAGE " [command]", .target = { 't', CMD_FIND_PANE, 0 }, @@ -111,7 +111,7 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) } else size = -1; - server_unzoom_window(wp->window); + window_push_zoom(wp->window, 1, args_has(args, 'Z')); input = (args_has(args, 'I') && args->argc == 0); flags = 0; @@ -153,6 +153,8 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) sc.flags = flags; if (args_has(args, 'd')) sc.flags |= SPAWN_DETACHED; + if (args_has(args, 'Z')) + sc.flags |= SPAWN_ZOOM; if ((new_wp = spawn_pane(&sc, &cause)) == NULL) { cmdq_error(item, "create pane failed: %s", cause); @@ -169,6 +171,7 @@ cmd_split_window_exec(struct cmd *self, struct cmdq_item *item) } if (!args_has(args, 'd')) cmd_find_from_winlink_pane(current, wl, new_wp, 0); + window_pop_zoom(wp->window); server_redraw_window(wp->window); server_status_session(s); |