mirror of
https://github.com/tmux/tmux.git
synced 2026-05-23 13:20:14 +00:00
Merge branch 'obsd-master'
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 },
|
||||
.usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] "
|
||||
"[-F format] [-l size] [-m message] [-p percentage] "
|
||||
"[-s style] [-S active-border-style] "
|
||||
"[-R inactive-border-style] [-x width] [-y height] "
|
||||
"[-X x-position] [-Y y-position] " CMD_TARGET_PANE_USAGE " "
|
||||
"[shell-command [argument ...]]",
|
||||
"[-s style] [-S active-border-style] "
|
||||
"[-R inactive-border-style] [-x width] [-y height] "
|
||||
"[-X x-position] [-Y y-position] " CMD_TARGET_PANE_USAGE " "
|
||||
"[shell-command [argument ...]]",
|
||||
|
||||
.target = { 't', CMD_FIND_PANE, 0 },
|
||||
|
||||
@@ -59,9 +59,9 @@ const struct cmd_entry cmd_split_window_entry = {
|
||||
.args = { "bc:de:fF:hIkl:m:p:PR:s:S:t:vZ", 0, -1, NULL },
|
||||
.usage = "[-bdefhIklPvZ] [-c start-directory] [-e environment] "
|
||||
"[-F format] [-l size] [-m message] [-p percentage] "
|
||||
"[-s style] [-S active-border-style] "
|
||||
"[-R inactive-border-style] " CMD_TARGET_PANE_USAGE " "
|
||||
"[shell-command [argument ...]]",
|
||||
"[-s style] [-S active-border-style] "
|
||||
"[-R inactive-border-style] " CMD_TARGET_PANE_USAGE " "
|
||||
"[shell-command [argument ...]]",
|
||||
|
||||
.target = { 't', CMD_FIND_PANE, 0 },
|
||||
|
||||
|
||||
@@ -79,6 +79,12 @@ 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)) {
|
||||
cmdq_error(item, "cannot swap floating panes");
|
||||
return (CMD_RETURN_ERROR);
|
||||
}
|
||||
|
||||
server_client_remove_pane(src_wp);
|
||||
server_client_remove_pane(dst_wp);
|
||||
|
||||
@@ -98,6 +104,10 @@ 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;
|
||||
}
|
||||
|
||||
src_wp->window = dst_w;
|
||||
options_set_parent(src_wp->options, dst_w->options);
|
||||
|
||||
@@ -336,7 +336,7 @@ layout_assign(struct window_pane **wp, struct layout_cell *lc, int flags)
|
||||
case LAYOUT_TOPBOTTOM:
|
||||
case LAYOUT_FLOATING:
|
||||
TAILQ_FOREACH(lcchild, &lc->cells, entry)
|
||||
layout_assign(wp, lcchild, 1);
|
||||
layout_assign(wp, lcchild, PANE_FLOATING);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ screen_redraw_type_of_cell(struct screen_redraw_ctx *ctx,
|
||||
struct client *c = ctx->c;
|
||||
struct window *w = c->session->curw->window;
|
||||
int pane_status = ctx->pane_status, borders = 0;
|
||||
int sx = w->sx, sy = w->sy;;
|
||||
int sx = w->sx, sy = w->sy;
|
||||
|
||||
/* Is this outside the window? */
|
||||
if (pane_status == PANE_STATUS_BOTTOM)
|
||||
@@ -480,7 +480,6 @@ screen_redraw_check_cell(struct screen_redraw_ctx *ctx, int px, int py,
|
||||
if (~wp->flags & PANE_FLOATING)
|
||||
tiled_only = 1;
|
||||
do { /* Loop until back to wp == start.*/
|
||||
|
||||
if (!window_pane_visible(wp) ||
|
||||
(tiled_only && (wp->flags & PANE_FLOATING)))
|
||||
goto next;
|
||||
|
||||
Reference in New Issue
Block a user