mirror of
https://github.com/tmux/tmux.git
synced 2026-03-26 21:26:25 +00:00
Prohibit swapping 2 floating panes, that doesn't make sense.
This commit is contained in:
4
layout.c
4
layout.c
@@ -301,6 +301,8 @@ layout_cell_is_top(struct window *w, struct layout_cell *lc)
|
||||
|
||||
while (lc != w->layout_root) {
|
||||
next = lc->parent;
|
||||
if (next == NULL)
|
||||
return (0);
|
||||
if (next->type == LAYOUT_TOPBOTTOM &&
|
||||
lc != TAILQ_FIRST(&next->cells))
|
||||
return (0);
|
||||
@@ -317,6 +319,8 @@ layout_cell_is_bottom(struct window *w, struct layout_cell *lc)
|
||||
|
||||
while (lc != w->layout_root) {
|
||||
next = lc->parent;
|
||||
if (next == NULL)
|
||||
return (0);
|
||||
if (next->type == LAYOUT_TOPBOTTOM &&
|
||||
lc != TAILQ_LAST(&next->cells, layout_cells))
|
||||
return (0);
|
||||
|
||||
Reference in New Issue
Block a user