summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-09-03 12:24:25 +0000
committernicm <nicm@openbsd.org>2012-09-03 12:24:25 +0000
commit57b70834e697879727e9dd5edc2b317c00d47a4a (patch)
tree09821a2e37b5ff910a3d269ba5b36ad006ad83c6
parentWhen choosing a pane found by find-window, switch to that pane rather (diff)
downloadwireguard-openbsd-57b70834e697879727e9dd5edc2b317c00d47a4a.tar.xz
wireguard-openbsd-57b70834e697879727e9dd5edc2b317c00d47a4a.zip
Use the right index when adding item in choose-tree, from Thomas Adam.
-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);
}