mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 11:18:48 +00:00
Remove an unnecessary variable and shorten a line.
This commit is contained in:
parent
86207ee676
commit
6e764fb53e
@ -330,14 +330,12 @@ window_choose_collapse(struct window_pane *wp, struct session *s)
|
|||||||
struct window_choose_mode_data *data = wp->modedata;
|
struct window_choose_mode_data *data = wp->modedata;
|
||||||
struct window_choose_mode_item *item, *chosen;
|
struct window_choose_mode_item *item, *chosen;
|
||||||
struct window_choose_data *wcd;
|
struct window_choose_data *wcd;
|
||||||
u_int i, pos;
|
u_int i;
|
||||||
|
|
||||||
ARRAY_DECL(, struct window_choose_mode_item) list_copy;
|
ARRAY_DECL(, struct window_choose_mode_item) list_copy;
|
||||||
ARRAY_INIT(&list_copy);
|
ARRAY_INIT(&list_copy);
|
||||||
|
|
||||||
pos = data->selected;
|
chosen = &ARRAY_ITEM(&data->list, data->selected);
|
||||||
|
|
||||||
chosen = &ARRAY_ITEM(&data->list, pos);
|
|
||||||
chosen->state &= ~TREE_EXPANDED;
|
chosen->state &= ~TREE_EXPANDED;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -353,9 +351,8 @@ window_choose_collapse(struct window_pane *wp, struct session *s)
|
|||||||
/* We only show the session when collapsed. */
|
/* We only show the session when collapsed. */
|
||||||
if (wcd->type & TREE_SESSION) {
|
if (wcd->type & TREE_SESSION) {
|
||||||
item->state &= ~TREE_EXPANDED;
|
item->state &= ~TREE_EXPANDED;
|
||||||
|
ARRAY_ADD(&list_copy, *item);
|
||||||
|
|
||||||
ARRAY_ADD(&list_copy,
|
|
||||||
ARRAY_ITEM(&data->list, i));
|
|
||||||
/*
|
/*
|
||||||
* Update the selection to this session item so
|
* Update the selection to this session item so
|
||||||
* we don't end up highlighting a non-existent
|
* we don't end up highlighting a non-existent
|
||||||
|
Loading…
Reference in New Issue
Block a user