mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 22:26:18 +00:00
Merge branch 'floating_panes' into floating_panes_staging
This commit is contained in:
@@ -79,8 +79,9 @@ cmd_swap_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
if (src_wp == dst_wp)
|
if (src_wp == dst_wp)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if ((src_wp->flags & PANE_FLOATING) && (dst_wp->flags & PANE_FLOATING)) {
|
if ((src_wp->flags & PANE_FLOATING) &&
|
||||||
cmdq_error(item, "cannot swap two floating panes");
|
(dst_wp->flags & PANE_FLOATING)) {
|
||||||
|
cmdq_error(item, "cannot swap floating panes");
|
||||||
return (CMD_RETURN_ERROR);
|
return (CMD_RETURN_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,6 +104,10 @@ cmd_swap_pane_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
dst_wp->layout_cell = src_lc;
|
dst_wp->layout_cell = src_lc;
|
||||||
dst_lc->wp = src_wp;
|
dst_lc->wp = src_wp;
|
||||||
src_wp->layout_cell = dst_lc;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
/* Swap PANE_FLOATING flag to keep each pane consistent with its new
|
/* Swap PANE_FLOATING flag to keep each pane consistent with its new
|
||||||
* layout cell (floating cells have parent == NULL). */
|
* layout cell (floating cells have parent == NULL). */
|
||||||
|
|||||||
Reference in New Issue
Block a user