=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-kill-pane.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- src/usr.bin/tmux/cmd-kill-pane.c 2009/11/13 19:53:29 1.9 +++ src/usr.bin/tmux/cmd-kill-pane.c 2011/01/04 00:42:46 1.10 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-kill-pane.c,v 1.9 2009/11/13 19:53:29 nicm Exp $ */ +/* $OpenBSD: cmd-kill-pane.c,v 1.10 2011/01/04 00:42:46 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott @@ -30,23 +30,22 @@ const struct cmd_entry cmd_kill_pane_entry = { "kill-pane", "killp", + "at:", 0, 0, "[-a] " CMD_TARGET_PANE_USAGE, - 0, "a", - cmd_target_init, - cmd_target_parse, - cmd_kill_pane_exec, - cmd_target_free, - cmd_target_print + 0, + NULL, + NULL, + cmd_kill_pane_exec }; int cmd_kill_pane_exec(struct cmd *self, struct cmd_ctx *ctx) { - struct cmd_target_data *data = self->data; + struct args *args = self->args; struct winlink *wl; struct window_pane *loopwp, *nextwp, *wp; - if ((wl = cmd_find_pane(ctx, data->target, NULL, &wp)) == NULL) + if ((wl = cmd_find_pane(ctx, args_get(args, 't'), NULL, &wp)) == NULL) return (-1); if (window_count_panes(wl->window) == 1) { @@ -56,7 +55,7 @@ return (0); } - if (cmd_check_flag(data->chflags, 'a')) { + if (args_has(self->args, 'a')) { loopwp = TAILQ_FIRST(&wl->window->panes); while (loopwp != NULL) { nextwp = TAILQ_NEXT(loopwp, entry);