summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2012-09-03 12:24:26 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2012-09-03 12:24:26 +0000
commit33ff6a67721a4e50b90056e1978aee5f0cd922fa (patch)
tree52ffaf2c8026acf83fab9395399fd8cf05c4468e /usr.bin/tmux
parentfd1ad01dee2894790859a3eeb2a19a434fe8742d (diff)
Use the right index when adding item in choose-tree, from Thomas Adam.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/cmd-choose-tree.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-choose-tree.c b/usr.bin/tmux/cmd-choose-tree.c
index 75dbae91c6b..2611c169a94 100644
--- a/usr.bin/tmux/cmd-choose-tree.c
+++ b/usr.bin/tmux/cmd-choose-tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-tree.c,v 1.9 2012/09/03 09:36:07 nicm Exp $ */
+/* $OpenBSD: cmd-choose-tree.c,v 1.10 2012/09/03 12:24:25 nicm Exp $ */
/*
* Copyright (c) 2012 Thomas Adam <thomas@xteddy.org>
@@ -212,7 +212,8 @@ windows_only:
window_choose_add_window(wl->window->active,
ctx, s2, wm, cur_win_template,
- final_win_action, idx_ses);
+ final_win_action,
+ (wflag && !sflag) ? win_ses : idx_ses);
free(final_win_action);
}