summaryrefslogtreecommitdiffstats
path: root/cmd-choose-tree.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2013-04-22 22:17:29 +0000
committerNicholas Marriott <nicm@openbsd.org>2013-04-22 22:17:29 +0000
commit3d2b7d5bce9532cedd647ace319afbf95ebe0e20 (patch)
treeec55025ca05d740847ce3a695aac50215bce2ac0 /cmd-choose-tree.c
parent04f54ab38f9a5f32e6fb89b57380cc7150c08006 (diff)
When using choose-tree -u, start with the current window
highlighted. From Thomas Adam.
Diffstat (limited to 'cmd-choose-tree.c')
-rw-r--r--cmd-choose-tree.c5
1 files changed, 4 insertions, 1 deletions
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);
}