mirror of
https://github.com/tmux/tmux.git
synced 2026-06-20 17:25:57 +00:00
Skip floating panes when working out the top or bottom cell. Fixes
missing bottom status pane status line when floating panes exist.
This commit is contained in:
30
layout.c
30
layout.c
@@ -292,15 +292,22 @@ layout_fix_offsets(struct window *w)
|
|||||||
static int
|
static int
|
||||||
layout_cell_is_top(struct window *w, struct layout_cell *lc)
|
layout_cell_is_top(struct window *w, struct layout_cell *lc)
|
||||||
{
|
{
|
||||||
struct layout_cell *next;
|
struct layout_cell *next, *edge;
|
||||||
|
|
||||||
while (lc != w->layout_root) {
|
while (lc != w->layout_root) {
|
||||||
next = lc->parent;
|
next = lc->parent;
|
||||||
if (next == NULL)
|
if (next == NULL)
|
||||||
return (0);
|
return (0);
|
||||||
if (next->type == LAYOUT_TOPBOTTOM &&
|
if (next->type == LAYOUT_TOPBOTTOM) {
|
||||||
lc != TAILQ_FIRST(&next->cells))
|
edge = TAILQ_FIRST(&next->cells);
|
||||||
return (0);
|
while (edge != NULL) {
|
||||||
|
if (~edge->flags & LAYOUT_CELL_FLOATING)
|
||||||
|
break;
|
||||||
|
edge = TAILQ_NEXT(edge, entry);
|
||||||
|
}
|
||||||
|
if (lc != edge)
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
lc = next;
|
lc = next;
|
||||||
}
|
}
|
||||||
return (1);
|
return (1);
|
||||||
@@ -310,15 +317,22 @@ layout_cell_is_top(struct window *w, struct layout_cell *lc)
|
|||||||
static int
|
static int
|
||||||
layout_cell_is_bottom(struct window *w, struct layout_cell *lc)
|
layout_cell_is_bottom(struct window *w, struct layout_cell *lc)
|
||||||
{
|
{
|
||||||
struct layout_cell *next;
|
struct layout_cell *next, *edge;
|
||||||
|
|
||||||
while (lc != w->layout_root) {
|
while (lc != w->layout_root) {
|
||||||
next = lc->parent;
|
next = lc->parent;
|
||||||
if (next == NULL)
|
if (next == NULL)
|
||||||
return (0);
|
return (0);
|
||||||
if (next->type == LAYOUT_TOPBOTTOM &&
|
if (next->type == LAYOUT_TOPBOTTOM) {
|
||||||
lc != TAILQ_LAST(&next->cells, layout_cells))
|
edge = TAILQ_LAST(&next->cells, layout_cells);
|
||||||
return (0);
|
while (edge != NULL) {
|
||||||
|
if (~edge->flags & LAYOUT_CELL_FLOATING)
|
||||||
|
break;
|
||||||
|
edge = TAILQ_PREV(edge, layout_cells, entry);
|
||||||
|
}
|
||||||
|
if (lc != edge)
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
lc = next;
|
lc = next;
|
||||||
}
|
}
|
||||||
return (1);
|
return (1);
|
||||||
|
|||||||
Reference in New Issue
Block a user