summaryrefslogtreecommitdiffstats
path: root/cmd-choose-tree.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2013-04-22 16:34:53 +0000
committerNicholas Marriott <nicm@openbsd.org>2013-04-22 16:34:53 +0000
commit04f54ab38f9a5f32e6fb89b57380cc7150c08006 (patch)
treecce4a1017baa0ea36a97058e533e340f7a61cbbf /cmd-choose-tree.c
parent46c7dbef0f7803dad39db355ee866ecab8db696c (diff)
Get session of -t window rather than client's window.
Diffstat (limited to 'cmd-choose-tree.c')
-rw-r--r--cmd-choose-tree.c5
1 files changed, 1 insertions, 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)