mirror of
https://github.com/tmux/tmux.git
synced 2026-06-21 01:35:23 +00:00
Merge pull request #5193 from daneofmanythings/fp--swap-floating-panes
fix(floating_panes): `swap-pane` can now affect floating panes.
This commit is contained in:
@@ -79,12 +79,6 @@ cmd_swap_pane_exec(struct cmd *self, struct cmdq_item *item)
|
||||
if (src_wp == dst_wp)
|
||||
goto out;
|
||||
|
||||
if (window_pane_is_floating(src_wp) ||
|
||||
window_pane_is_floating(dst_wp)) {
|
||||
cmdq_error(item, "cannot swap floating panes");
|
||||
return (CMD_RETURN_ERROR);
|
||||
}
|
||||
|
||||
server_client_remove_pane(src_wp);
|
||||
server_client_remove_pane(dst_wp);
|
||||
|
||||
@@ -114,10 +108,6 @@ 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 (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;
|
||||
options_set_parent(src_wp->options, dst_w->options);
|
||||
|
||||
Reference in New Issue
Block a user