mirror of
https://github.com/tmux/tmux.git
synced 2026-06-03 16:46:18 +00:00
Move the PANE_FLOATING flag into the layout cell and add an accessor.
From Dane Jensen.
This commit is contained in:
@@ -79,8 +79,8 @@ cmd_swap_pane_exec(struct cmd *self, struct cmdq_item *item)
|
||||
if (src_wp == dst_wp)
|
||||
goto out;
|
||||
|
||||
if ((src_wp->flags & PANE_FLOATING) &&
|
||||
(dst_wp->flags & PANE_FLOATING)) {
|
||||
if (window_pane_is_floating(src_wp) &&
|
||||
window_pane_is_floating(dst_wp)) {
|
||||
cmdq_error(item, "cannot swap floating panes");
|
||||
return (CMD_RETURN_ERROR);
|
||||
}
|
||||
@@ -114,9 +114,9 @@ cmd_swap_pane_exec(struct cmd *self, struct cmdq_item *item)
|
||||
dst_wp->layout_cell = src_lc;
|
||||
dst_lc->wp = src_wp;
|
||||
src_wp->layout_cell = dst_lc;
|
||||
if ((src_wp->flags ^ dst_wp->flags) & PANE_FLOATING) {
|
||||
src_wp->flags ^= PANE_FLOATING;
|
||||
dst_wp->flags ^= PANE_FLOATING;
|
||||
if (window_pane_is_floating(src_wp) != window_pane_is_floating(dst_wp)) {
|
||||
src_wp->layout_cell->flags ^= LAYOUT_CELL_FLOATING;
|
||||
dst_wp->layout_cell->flags ^= LAYOUT_CELL_FLOATING;
|
||||
}
|
||||
|
||||
src_wp->window = dst_w;
|
||||
|
||||
Reference in New Issue
Block a user