diff options
author | Thomas Adam <thomas@xteddy.org> | 2013-04-23 08:26:04 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2013-04-23 08:26:04 +0100 |
commit | cd60e57b6ac682a56fd66d70af4c5922315b5a9a (patch) | |
tree | a76972a47860584e78d4595958bc68c6e97e303a /cmd-choose-tree.c | |
parent | c24b58e2ee8691870736959deb252c225b205b4d (diff) | |
parent | 3d2b7d5bce9532cedd647ace319afbf95ebe0e20 (diff) | |
download | rtmux-cd60e57b6ac682a56fd66d70af4c5922315b5a9a.tar.gz rtmux-cd60e57b6ac682a56fd66d70af4c5922315b5a9a.tar.bz2 rtmux-cd60e57b6ac682a56fd66d70af4c5922315b5a9a.zip |
Merge branch 'obsd-master'
Sync from OpenBSD.
Diffstat (limited to 'cmd-choose-tree.c')
-rw-r--r-- | cmd-choose-tree.c | 10 |
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); } |