summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-choose-tree.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2013-10-10 11:58:53 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2013-10-10 11:58:53 +0000
commit8f5cb6dc3fc952af86c0252199b37cc7420fc953 (patch)
tree9e6dafad6766ec452aa6bdf26183d6ba81926afa /usr.bin/tmux/cmd-choose-tree.c
parentccbb0aa903c99cac5b9fa887298c51c1fe44dfac (diff)
choose-tree: Reset top when toggling items
When choose-tree is told to expand/collapse items (especially when first rendering collapsed to just show sessions), ensure that in addition to setting the selected item, that the item itself appears on the bottom of the screen, rather than off screen. This was causing rendering glitches when a very small tmux window tried to render a list of items in choose-tree much larger than itself, and the selected item appeared off screen, and didn't show the selection until the selection had wrapped around to the top of the screen.
Diffstat (limited to 'usr.bin/tmux/cmd-choose-tree.c')
-rw-r--r--usr.bin/tmux/cmd-choose-tree.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-choose-tree.c b/usr.bin/tmux/cmd-choose-tree.c
index f3bfa8ed1e4..2e34537fad0 100644
--- a/usr.bin/tmux/cmd-choose-tree.c
+++ b/usr.bin/tmux/cmd-choose-tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-tree.c,v 1.23 2013/04/22 22:17:29 nicm Exp $ */
+/* $OpenBSD: cmd-choose-tree.c,v 1.24 2013/10/10 11:58:52 nicm Exp $ */
/*
* Copyright (c) 2012 Thomas Adam <thomas@xteddy.org>
@@ -228,7 +228,6 @@ 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')) {
window_choose_expand_all(wl->window->active);