Get session of -t window rather than client's window.

pull/1/head
Nicholas Marriott 2013-04-22 16:34:53 +00:00
parent 46c7dbef0f
commit 04f54ab38f
1 changed files with 1 additions and 4 deletions

View File

@ -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)