summaryrefslogtreecommitdiffstats
path: root/window-choose.c
diff options
context:
space:
mode:
authornicm <nicm>2015-02-05 10:29:43 +0000
committernicm <nicm>2015-02-05 10:29:43 +0000
commit4946f74253de52f10beb023d4c5b88bafdb11ec4 (patch)
tree4210eaf66f9aee7998ec558ce34a1c9454ae0b71 /window-choose.c
parente5d9ceff18e37320b9243d24204a0a79d77172e4 (diff)
Wrap all the individual format_* calls in a single format_defaults
functions.
Diffstat (limited to 'window-choose.c')
-rw-r--r--window-choose.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/window-choose.c b/window-choose.c
index 0d724746..69141676 100644
--- a/window-choose.c
+++ b/window-choose.c
@@ -919,7 +919,7 @@ window_choose_add_session(struct window_pane *wp, struct client *c,
wcd->ft_template = xstrdup(template);
format_add(wcd->ft, "line", "%u", idx);
- format_session(wcd->ft, s);
+ format_defaults(wcd->ft, NULL, s, NULL, NULL);
wcd->command = cmd_template_replace(action, s->name, 1);
@@ -946,9 +946,7 @@ window_choose_add_window(struct window_pane *wp, struct client *c,
wcd->ft_template = xstrdup(template);
format_add(wcd->ft, "line", "%u", idx);
- format_session(wcd->ft, s);
- format_winlink(wcd->ft, s, wl);
- format_window_pane(wcd->ft, wl->window->active);
+ format_defaults(wcd->ft, NULL, s, wl, NULL);
xasprintf(&expanded, "%s:%d", s->name, wl->idx);
wcd->command = cmd_template_replace(action, expanded, 1);