summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-new-window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2020-04-03 13:54:32 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2020-04-03 13:54:32 +0000
commit19c394608cd4aeeebcb1508005c9b407b3bbbc2c (patch)
treea1012225422226fa549a6075ad052e74d10334d7 /usr.bin/tmux/cmd-new-window.c
parent3f3a92c5f89824c0febd5ba159290c96c5276d91 (diff)
Use new window and new pane as well for -P to new-session or new-window.
Diffstat (limited to 'usr.bin/tmux/cmd-new-window.c')
-rw-r--r--usr.bin/tmux/cmd-new-window.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-new-window.c b/usr.bin/tmux/cmd-new-window.c
index 1e9db5f4595..9dbecea01ba 100644
--- a/usr.bin/tmux/cmd-new-window.c
+++ b/usr.bin/tmux/cmd-new-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-new-window.c,v 1.81 2020/03/31 17:14:40 nicm Exp $ */
+/* $OpenBSD: cmd-new-window.c,v 1.82 2020/04/03 13:54:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -108,7 +108,8 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'P')) {
if ((template = args_get(args, 'F')) == NULL)
template = NEW_WINDOW_TEMPLATE;
- cp = format_single(item, template, c, s, new_wl, NULL);
+ cp = format_single(item, template, c, s, new_wl,
+ new_wl->window->active);
cmdq_print(item, "%s", cp);
free(cp);
}