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.
This commit is contained in:
Thomas
2013-08-09 10:37:46 +01:00
committed by Thomas Adam
parent 5532766b19
commit aa4920fea3
2 changed files with 17 additions and 9 deletions

View File

@ -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);