=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-move-window.c,v retrieving revision 1.32 retrieving revision 1.33 diff -c -r1.32 -r1.33 *** src/usr.bin/tmux/cmd-move-window.c 2020/04/22 21:15:33 1.32 --- src/usr.bin/tmux/cmd-move-window.c 2020/06/13 09:05:53 1.33 *************** *** 1,4 **** ! /* $OpenBSD: cmd-move-window.c,v 1.32 2020/04/22 21:15:33 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: cmd-move-window.c,v 1.33 2020/06/13 09:05:53 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott *************** *** 32,39 **** .name = "move-window", .alias = "movew", ! .args = { "adkrs:t:", 0, 0 }, ! .usage = "[-dkr] " CMD_SRCDST_WINDOW_USAGE, .source = { 's', CMD_FIND_WINDOW, 0 }, /* -t is special */ --- 32,39 ---- .name = "move-window", .alias = "movew", ! .args = { "abdkrs:t:", 0, 0 }, ! .usage = "[-abdkr] " CMD_SRCDST_WINDOW_USAGE, .source = { 's', CMD_FIND_WINDOW, 0 }, /* -t is special */ *************** *** 46,53 **** .name = "link-window", .alias = "linkw", ! .args = { "adks:t:", 0, 0 }, ! .usage = "[-dk] " CMD_SRCDST_WINDOW_USAGE, .source = { 's', CMD_FIND_WINDOW, 0 }, /* -t is special */ --- 46,53 ---- .name = "link-window", .alias = "linkw", ! .args = { "abdks:t:", 0, 0 }, ! .usage = "[-abdk] " CMD_SRCDST_WINDOW_USAGE, .source = { 's', CMD_FIND_WINDOW, 0 }, /* -t is special */ *************** *** 67,73 **** struct session *dst; struct winlink *wl = source->wl; char *cause; ! int idx, kflag, dflag, sflag; if (args_has(args, 'r')) { if (cmd_find_target(&target, item, tflag, CMD_FIND_SESSION, --- 67,73 ---- struct session *dst; struct winlink *wl = source->wl; char *cause; ! int idx, kflag, dflag, sflag, before; if (args_has(args, 'r')) { if (cmd_find_target(&target, item, tflag, CMD_FIND_SESSION, *************** *** 90,100 **** dflag = args_has(args, 'd'); sflag = args_has(args, 's'); ! if (args_has(args, 'a')) { if (target.wl != NULL) ! idx = winlink_shuffle_up(dst, target.wl); else ! idx = winlink_shuffle_up(dst, dst->curw); if (idx == -1) return (CMD_RETURN_ERROR); } --- 90,101 ---- dflag = args_has(args, 'd'); sflag = args_has(args, 's'); ! before = args_has(args, 'b'); ! if (args_has(args, 'a') || before) { if (target.wl != NULL) ! idx = winlink_shuffle_up(dst, target.wl, before); else ! idx = winlink_shuffle_up(dst, dst->curw, before); if (idx == -1) return (CMD_RETURN_ERROR); }