From ebf94bc9cba6c41074fdfa1d1084ad5fff43fc24 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 22 May 2012 11:35:37 +0000 Subject: Switch all of the various choose- and list- commands over to the format infrastructure, from Thomas Adam. --- cmd-new-window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd-new-window.c') diff --git a/cmd-new-window.c b/cmd-new-window.c index 5051ab1a..46bda8fc 100644 --- a/cmd-new-window.c +++ b/cmd-new-window.c @@ -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); -- cgit v1.2.3