Discussion:
[PATCH] choose-tree: Fix expand/collapse selection
Thomas Adam
2015-05-02 19:45:04 UTC
Permalink
When expanding/toggling a given session in the choose-tree list, ensure we
start from the select item, and not the index of the item's position, since
this ends up producing odd screen redraw problems since the index doesn't
match the array index of the items on the screen.
---
window-choose.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/window-choose.c b/window-choose.c
index 5de8757..8672212 100644
--- a/window-choose.c
+++ b/window-choose.c
@@ -559,10 +559,10 @@ window_choose_key(struct window_pane *wp, unused struct client *c,
break;
if (item->state & TREE_EXPANDED) {
window_choose_collapse(wp, item->wcd->tree_session,
- item->wcd->idx);
+ data->selected);
} else {
window_choose_expand(wp, item->wcd->tree_session,
- item->wcd->idx);
+ data->selected);
}
window_choose_redraw_screen(wp);
break;
--
2.1.4
Loading...