summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/window-choose.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-02-05 10:29:44 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-02-05 10:29:44 +0000
commitf55493a26fd9dcc42751e57ecacda0f2dc35bd79 (patch)
tree6c923cf0baeb9e58228f88ce491cb5df6e862075 /usr.bin/tmux/window-choose.c
parenta260dfa82e0bf8576b9a0c10e17ea4eb5a87b620 (diff)
Wrap all the individual format_* calls in a single format_defaults
functions.
Diffstat (limited to 'usr.bin/tmux/window-choose.c')
-rw-r--r--usr.bin/tmux/window-choose.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/tmux/window-choose.c b/usr.bin/tmux/window-choose.c
index 513aed5fd8a..4fad8f62f04 100644
--- a/usr.bin/tmux/window-choose.c
+++ b/usr.bin/tmux/window-choose.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window-choose.c,v 1.58 2015/01/15 13:43:13 nicm Exp $ */
+/* $OpenBSD: window-choose.c,v 1.59 2015/02/05 10:29:43 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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);