From 04f54ab38f9a5f32e6fb89b57380cc7150c08006 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 22 Apr 2013 16:34:53 +0000 Subject: [PATCH] Get session of -t window rather than client's window. --- cmd-choose-tree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd-choose-tree.c b/cmd-choose-tree.c index f22f17c2..db0333e7 100644 --- a/cmd-choose-tree.c +++ b/cmd-choose-tree.c @@ -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)