diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-05-29 08:15:45 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-05-29 08:15:45 +0000 |
commit | db20f2d907caaa44797ec2f062903ba060aa4374 (patch) | |
tree | 26059995f0950517354f1d12cfd558d29be8684d | |
parent | 63d109fb7fb4522bf4d21528e12a14d91a8bb556 (diff) |
Add pane title to choose-window template and use the right index for the
pane, from Romain Francoise.
-rw-r--r-- | cmd-choose-window.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd-choose-window.c b/cmd-choose-window.c index ba70fcd1..fffdfbb4 100644 --- a/cmd-choose-window.c +++ b/cmd-choose-window.c @@ -72,7 +72,7 @@ cmd_choose_window_exec(struct cmd *self, struct cmd_ctx *ctx) return (0); if ((template = args_get(args, 'F')) == NULL) - template = DEFAULT_WINDOW_TEMPLATE; + template = DEFAULT_WINDOW_TEMPLATE " \"#{pane_title}\""; cur = idx = 0; RB_FOREACH(wm, winlinks, &s->windows) { @@ -84,9 +84,10 @@ cmd_choose_window_exec(struct cmd *self, struct cmd_ctx *ctx) format_add(ft, "line", "%u", idx); format_session(ft, s); format_winlink(ft, s, wm); + format_window_pane(ft, wm->window->active); line = format_expand(ft, template); - window_choose_add(wl->window->active, idx, "%s", line); + window_choose_add(wl->window->active, wm->idx, "%s", line); xfree(line); format_free(ft); |