mirror of
https://github.com/tmux/tmux.git
synced 2026-06-20 17:25:57 +00:00
Fix for where choose-tree shows empty preview in a floating pane.
This commit is contained in:
@@ -354,6 +354,8 @@ window_tree_build(void *modedata, struct sort_criteria *sort_crit,
|
|||||||
struct window_tree_modedata *data = modedata;
|
struct window_tree_modedata *data = modedata;
|
||||||
struct session *s, **l;
|
struct session *s, **l;
|
||||||
struct session_group *sg, *current;
|
struct session_group *sg, *current;
|
||||||
|
struct window *w;
|
||||||
|
struct window_pane *lastwp;
|
||||||
u_int n, i;
|
u_int n, i;
|
||||||
|
|
||||||
current = session_group_contains(data->fs.s);
|
current = session_group_contains(data->fs.s);
|
||||||
@@ -390,7 +392,15 @@ window_tree_build(void *modedata, struct sort_criteria *sort_crit,
|
|||||||
case WINDOW_TREE_PANE:
|
case WINDOW_TREE_PANE:
|
||||||
if (window_count_panes(data->fs.wl->window, 1) == 1)
|
if (window_count_panes(data->fs.wl->window, 1) == 1)
|
||||||
*tag = (uint64_t)data->fs.wl;
|
*tag = (uint64_t)data->fs.wl;
|
||||||
else
|
else if (window_pane_is_floating(data->fs.wp)) {
|
||||||
|
w = data->fs.wl->window;
|
||||||
|
TAILQ_FOREACH(lastwp, &w->last_panes, sentry) {
|
||||||
|
if (!window_pane_is_floating(lastwp))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
*tag = (lastwp != NULL) ?
|
||||||
|
(uint64_t)lastwp : (uint64_t)data->fs.wl;
|
||||||
|
} else
|
||||||
*tag = (uint64_t)data->fs.wp;
|
*tag = (uint64_t)data->fs.wp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user