=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-break-pane.c,v retrieving revision 1.58 retrieving revision 1.59 diff -c -r1.58 -r1.59 *** src/usr.bin/tmux/cmd-break-pane.c 2020/05/26 09:01:03 1.58 --- src/usr.bin/tmux/cmd-break-pane.c 2020/06/13 09:05:53 1.59 *************** *** 1,4 **** ! /* $OpenBSD: cmd-break-pane.c,v 1.58 2020/05/26 09:01:03 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-break-pane.c,v 1.59 2020/06/13 09:05:53 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott *************** *** 34,41 **** .name = "break-pane", .alias = "breakp", ! .args = { "adPF:n:s:t:", 0, 0 }, ! .usage = "[-adP] [-F format] [-n window-name] [-s src-pane] " "[-t dst-window]", .source = { 's', CMD_FIND_PANE, 0 }, --- 34,41 ---- .name = "break-pane", .alias = "breakp", ! .args = { "abdPF:n:s:t:", 0, 0 }, ! .usage = "[-abdP] [-F format] [-n window-name] [-s src-pane] " "[-t dst-window]", .source = { 's', CMD_FIND_PANE, 0 }, *************** *** 58,73 **** struct session *dst_s = target->s; struct window_pane *wp = source->wp; struct window *w = wl->window; ! char *name, *cause; ! int idx = target->idx; const char *template; - char *cp; ! if (args_has(args, 'a')) { if (target->wl != NULL) ! idx = winlink_shuffle_up(dst_s, target->wl); else ! idx = winlink_shuffle_up(dst_s, dst_s->curw); if (idx == -1) return (CMD_RETURN_ERROR); } --- 58,73 ---- struct session *dst_s = target->s; struct window_pane *wp = source->wp; struct window *w = wl->window; ! char *name, *cause, *cp; ! int idx = target->idx, before; const char *template; ! before = args_has(args, 'b'); ! if (args_has(args, 'a') || before) { if (target->wl != NULL) ! idx = winlink_shuffle_up(dst_s, target->wl, before); else ! idx = winlink_shuffle_up(dst_s, dst_s->curw, before); if (idx == -1) return (CMD_RETURN_ERROR); }