summaryrefslogtreecommitdiffstats
path: root/cmd-choose-tree.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2013-03-21 16:23:07 +0000
committerNicholas Marriott <nicm@openbsd.org>2013-03-21 16:23:07 +0000
commit66414029a12af55f4e6b4a421d5e193c2561e30c (patch)
treec8f7cd1c380c6fa138e1166675be6161df741c16 /cmd-choose-tree.c
parent51d989f5dfaa63a844ae291772f20c486a5982fb (diff)
Run session command before window in choose-tree.
Diffstat (limited to 'cmd-choose-tree.c')
-rw-r--r--cmd-choose-tree.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd-choose-tree.c b/cmd-choose-tree.c
index a111bc07..1e6bba71 100644
--- a/cmd-choose-tree.c
+++ b/cmd-choose-tree.c
@@ -37,7 +37,7 @@ enum cmd_retval cmd_choose_tree_exec(struct cmd *, struct cmd_ctx *);
const struct cmd_entry cmd_choose_tree_entry = {
"choose-tree", NULL,
"S:W:swub:c:t:", 0, 1,
- "[-swu] [-b session-template] [-c window template] [-S format] " \
+ "[-suw] [-b session-template] [-c window template] [-S format] " \
"[-W format] " CMD_TARGET_WINDOW_USAGE,
0,
NULL,
@@ -174,7 +174,7 @@ cmd_choose_tree_exec(struct cmd *self, struct cmd_ctx *ctx)
}
wcd = window_choose_add_session(wl->window->active,
- c, s2, ses_template, (char *)ses_action, idx_ses);
+ c, s2, ses_template, ses_action, idx_ses);
/* If we're just choosing sessions, skip choosing windows. */
if (sflag && !wflag) {
@@ -203,8 +203,8 @@ windows_only:
cur_win = idx_ses;
}
- xasprintf(&final_win_action, "%s ; %s", win_action,
- wcd ? wcd->command : "");
+ xasprintf(&final_win_action, "%s ; %s",
+ wcd ? wcd->command : "", win_action);
if (win_ses != win_max)
cur_win_template = final_win_template_middle;