mirror of
https://github.com/tmux/tmux.git
synced 2026-05-30 14:16:18 +00:00
Merge branch 'master' into floating_panes
This commit is contained in:
@@ -41,10 +41,10 @@ const struct cmd_entry cmd_new_pane_entry = {
|
|||||||
.args = { "bc:de:fF:hIkl:Lm:p:PR:s:S:t:vx:X:y:Y:Z", 0, -1, NULL },
|
.args = { "bc:de:fF:hIkl:Lm:p:PR:s:S:t:vx:X:y:Y:Z", 0, -1, NULL },
|
||||||
.usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] "
|
.usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] "
|
||||||
"[-F format] [-l size] [-m message] [-p percentage] "
|
"[-F format] [-l size] [-m message] [-p percentage] "
|
||||||
"[-s style] [-S active-border-style] "
|
"[-s style] [-S active-border-style] "
|
||||||
"[-R inactive-border-style] [-x width] [-y height] "
|
"[-R inactive-border-style] [-x width] [-y height] "
|
||||||
"[-X x-position] [-Y y-position] " CMD_TARGET_PANE_USAGE " "
|
"[-X x-position] [-Y y-position] " CMD_TARGET_PANE_USAGE " "
|
||||||
"[shell-command [argument ...]]",
|
"[shell-command [argument ...]]",
|
||||||
|
|
||||||
.target = { 't', CMD_FIND_PANE, 0 },
|
.target = { 't', CMD_FIND_PANE, 0 },
|
||||||
|
|
||||||
@@ -58,9 +58,10 @@ const struct cmd_entry cmd_split_window_entry = {
|
|||||||
|
|
||||||
.args = { "bc:de:fF:hIkl:m:p:PR:s:S:t:vZ", 0, -1, NULL },
|
.args = { "bc:de:fF:hIkl:m:p:PR:s:S:t:vZ", 0, -1, NULL },
|
||||||
.usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] "
|
.usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] "
|
||||||
"[-F format] [-l size] [-m message] [-p percentage] [-s style] "
|
"[-F format] [-l size] [-m message] [-p percentage] "
|
||||||
"[-S active-border-style] [-R inactive-border-style] "
|
"[-s style] [-S active-border-style] "
|
||||||
CMD_TARGET_PANE_USAGE " [shell-command [argument ...]]",
|
"[-R inactive-border-style] " CMD_TARGET_PANE_USAGE " "
|
||||||
|
"[shell-command [argument ...]]",
|
||||||
|
|
||||||
.target = { 't', CMD_FIND_PANE, 0 },
|
.target = { 't', CMD_FIND_PANE, 0 },
|
||||||
|
|
||||||
|
|||||||
@@ -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