mirror of
https://github.com/tmux/tmux.git
synced 2026-06-22 04:46:59 +00:00
There was an bug with the earlier commit, reproduction: "splitw; newp
-t0; killp -t0". Added logic to handle previously unforseen states, like a floating cell before a tiled cell at the top of the screen.
This commit is contained in:
28
window.c
28
window.c
@@ -751,21 +751,6 @@ window_zoom(struct window_pane *wp)
|
||||
window_set_active_pane(w, wp, 1);
|
||||
wp->flags |= PANE_ZOOMED;
|
||||
|
||||
/* Bring pane above other tiled panes and hide floating panes. */
|
||||
TAILQ_FOREACH(wp1, &w->z_index, zentry) {
|
||||
if (wp1 == wp) {
|
||||
wp1->saved_flags |= (wp1->flags & PANE_HIDDEN);
|
||||
wp1->flags &= ~PANE_HIDDEN;
|
||||
continue;
|
||||
}
|
||||
if (window_pane_is_floating(wp1)) {
|
||||
wp1->saved_flags |= (wp1->flags & PANE_HIDDEN);
|
||||
wp1->flags |= PANE_HIDDEN;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
TAILQ_FOREACH(wp1, &w->panes, entry) {
|
||||
wp1->saved_layout_cell = wp1->layout_cell;
|
||||
wp1->layout_cell = NULL;
|
||||
@@ -792,20 +777,9 @@ window_unzoom(struct window *w, int notify)
|
||||
w->layout_root = w->saved_layout_root;
|
||||
w->saved_layout_root = NULL;
|
||||
|
||||
TAILQ_FOREACH(wp, &w->z_index, zentry) {
|
||||
if (window_pane_is_floating(wp)) {
|
||||
wp->flags &= ~PANE_HIDDEN | (wp->saved_flags & PANE_HIDDEN);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
TAILQ_FOREACH(wp, &w->panes, entry) {
|
||||
wp->layout_cell = wp->saved_layout_cell;
|
||||
if (wp->flags & PANE_HIDDEN)
|
||||
wp->saved_layout_cell = wp->layout_cell;
|
||||
else
|
||||
wp->saved_layout_cell = NULL;
|
||||
wp->saved_layout_cell = NULL;
|
||||
wp->flags &= ~PANE_ZOOMED;
|
||||
}
|
||||
layout_fix_panes(w, NULL);
|
||||
|
||||
Reference in New Issue
Block a user