summaryrefslogtreecommitdiff
path: root/usr.bin/tmux
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2013-04-22 16:34:54 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2013-04-22 16:34:54 +0000
commitda84a3ce6ddd3c72a7f6c6405c6d64791b29c33e (patch)
tree3a3b0e9780b513fb7c7fe42f4f1d9c683b1d12a4 /usr.bin/tmux
parent745df0d0ed3f778bd125e87bdfc3815cfcb2273e (diff)
Get session of -t window rather than client's window.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r--usr.bin/tmux/cmd-choose-tree.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/tmux/cmd-choose-tree.c b/usr.bin/tmux/cmd-choose-tree.c
index e0be4a85618..aa889a5cb4f 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.21 2013/03/24 09:54:10 nicm Exp $ */
+/* $OpenBSD: cmd-choose-tree.c,v 1.22 2013/04/22 16:34:53 nicm Exp $ */
/*
* Copyright (c) 2012 Thomas Adam <thomas@xteddy.org>
@@ -89,10 +89,7 @@ cmd_choose_tree_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_ERROR);
}
- if ((s = c->session) == NULL)
- return (CMD_RETURN_ERROR);
-
- if ((wl = cmd_find_window(cmdq, args_get(args, 't'), NULL)) == NULL)
+ if ((wl = cmd_find_window(cmdq, args_get(args, 't'), &s)) == NULL)
return (CMD_RETURN_ERROR);
if (window_pane_set_mode(wl->window->active, &window_choose_mode) != 0)