aboutsummaryrefslogtreecommitdiff
path: root/cmd-new-window.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-05-22 21:03:25 +0000
committerTiago Cunha <tcunha@gmx.com>2012-05-22 21:03:25 +0000
commit5cc4961fd28fe920236c6716f6ff751d22d90188 (patch)
tree7cd1846843b9693dd46f0eae010e5297c6f5ce79 /cmd-new-window.c
parentbaafc17a1e9e6b622bcb36dfd096c1316dcbbfda (diff)
downloadrtmux-5cc4961fd28fe920236c6716f6ff751d22d90188.tar.gz
rtmux-5cc4961fd28fe920236c6716f6ff751d22d90188.tar.bz2
rtmux-5cc4961fd28fe920236c6716f6ff751d22d90188.zip
Sync OpenBSD patchset 1119:
Switch all of the various choose- and list- commands over to the format infrastructure, from Thomas Adam.
Diffstat (limited to 'cmd-new-window.c')
-rw-r--r--cmd-new-window.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-new-window.c b/cmd-new-window.c
index ccc6d5e2..94258556 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);