If -s to swap-pane is not given, use the current pane.

pull/1/head
Nicholas Marriott 2013-03-28 15:08:12 +00:00
parent 66afcf5be0
commit 738e789dbd
1 changed files with 6 additions and 2 deletions

View File

@ -75,8 +75,12 @@ cmd_swap_pane_exec(struct cmd *self, struct cmd_q *cmdq)
src_wp = TAILQ_PREV(dst_wp, window_panes, entry);
if (src_wp == NULL)
src_wp = TAILQ_LAST(&dst_w->panes, window_panes);
} else
return (CMD_RETURN_NORMAL);
} else {
src_wl = cmd_find_pane(cmdq, NULL, NULL, &src_wp);
if (src_wl == NULL)
return (CMD_RETURN_ERROR);
src_w = src_wl->window;
}
} else {
src_wl = cmd_find_pane(cmdq, args_get(args, 's'), NULL, &src_wp);
if (src_wl == NULL)