From 04f54ab38f9a5f32e6fb89b57380cc7150c08006 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 22 Apr 2013 16:34:53 +0000 Subject: Get session of -t window rather than client's window. --- cmd-choose-tree.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cmd-choose-tree.c') 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) -- cgit From 3d2b7d5bce9532cedd647ace319afbf95ebe0e20 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 22 Apr 2013 22:17:29 +0000 Subject: When using choose-tree -u, start with the current window highlighted. From Thomas Adam. --- cmd-choose-tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd-choose-tree.c') diff --git a/cmd-choose-tree.c b/cmd-choose-tree.c index db0333e7..601d24f1 100644 --- a/cmd-choose-tree.c +++ b/cmd-choose-tree.c @@ -228,9 +228,12 @@ windows_only: free(final_win_template_last); window_choose_ready(wl->window->active, cur_win, NULL); + window_choose_collapse_all(wl->window->active); - if (args_has(args, 'u')) + if (args_has(args, 'u')) { window_choose_expand_all(wl->window->active); + window_choose_set_current(wl->window->active, cur_win); + } return (CMD_RETURN_NORMAL); } -- cgit