aboutsummaryrefslogtreecommitdiff
path: root/cmd-choose-tree.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2013-04-24 11:00:32 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2013-04-24 11:00:32 +0100
commitce52e45d44b38fcedfe27bce519ce6f4fc76a25d (patch)
tree03a44f9facd3deb64ec20b08af7323e803fc7668 /cmd-choose-tree.c
parent4f3c31a6b63f4489bfc672b510036fd8d9491595 (diff)
parent70bc8ef8450bfd2ae90df86f4c02437a4bb83319 (diff)
downloadrtmux-ce52e45d44b38fcedfe27bce519ce6f4fc76a25d.tar.gz
rtmux-ce52e45d44b38fcedfe27bce519ce6f4fc76a25d.tar.bz2
rtmux-ce52e45d44b38fcedfe27bce519ce6f4fc76a25d.zip
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
Diffstat (limited to 'cmd-choose-tree.c')
-rw-r--r--cmd-choose-tree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd-choose-tree.c b/cmd-choose-tree.c
index e2d382b3..a9b6ffbc 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)
@@ -231,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);
}