diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-05-22 11:35:38 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2012-05-22 11:35:38 +0000 |
commit | 78cd304b7b07161637cb18551d43b87d7e1f7be4 (patch) | |
tree | ad6f80162d80948362de9d2484e783186a92d6e0 /usr.bin/tmux/cmd-new-window.c | |
parent | 1a47989e1c6a692ac3c72e02286e5f1fcafc90da (diff) |
Switch all of the various choose- and list- commands over to the format
infrastructure, from Thomas Adam.
Diffstat (limited to 'usr.bin/tmux/cmd-new-window.c')
-rw-r--r-- | usr.bin/tmux/cmd-new-window.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-new-window.c b/usr.bin/tmux/cmd-new-window.c index 242e36b4ba3..a267b405984 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.23 2012/03/17 22:35:09 nicm Exp $ */ +/* $OpenBSD: cmd-new-window.c,v 1.24 2012/05/22 11:35:37 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -122,15 +122,15 @@ cmd_new_window_exec(struct cmd *self, struct cmd_ctx *ctx) server_status_session_group(s); if (args_has(args, 'P')) { - template = "#{session_name}:#{window_index}"; - if (args_has(args, 'F')) - template = args_get(args, 'F'); + if ((template = args_get(args, 'F')) == NULL) + template = DEFAULT_PANE_INFO_TEMPLATE; ft = format_create(); if ((c = cmd_find_client(ctx, NULL)) != NULL) format_client(ft, c); format_session(ft, s); format_winlink(ft, s, wl); + format_window_pane(ft, wl->window->active); cp = format_expand(ft, template); ctx->print(ctx, "%s", cp); |