From: nicm Date: Mon, 4 May 2015 13:04:10 +0000 (+0000) Subject: Use the right index when expanding/collapsing tree, from Thomas Adam. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e11f7741c6ad38d43f9187ce164f1cbdec0e0aee;p=openbsd Use the right index when expanding/collapsing tree, from Thomas Adam. --- diff --git a/usr.bin/tmux/window-choose.c b/usr.bin/tmux/window-choose.c index dda0a0f3afd..f4c2e82015f 100644 --- a/usr.bin/tmux/window-choose.c +++ b/usr.bin/tmux/window-choose.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window-choose.c,v 1.61 2015/04/19 21:34:21 nicm Exp $ */ +/* $OpenBSD: window-choose.c,v 1.62 2015/05/04 13:04:10 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -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;