=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-respawn-window.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- src/usr.bin/tmux/cmd-respawn-window.c 2016/10/10 21:51:39 1.31 +++ src/usr.bin/tmux/cmd-respawn-window.c 2016/10/16 19:04:05 1.32 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-respawn-window.c,v 1.31 2016/10/10 21:51:39 nicm Exp $ */ +/* $OpenBSD: cmd-respawn-window.c,v 1.32 2016/10/16 19:04:05 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott @@ -27,7 +27,8 @@ * Respawn a window (restart the command). Kill existing if -k given. */ -static enum cmd_retval cmd_respawn_window_exec(struct cmd *, struct cmd_q *); +static enum cmd_retval cmd_respawn_window_exec(struct cmd *, + struct cmdq_item *); const struct cmd_entry cmd_respawn_window_entry = { .name = "respawn-window", @@ -43,11 +44,11 @@ }; static enum cmd_retval -cmd_respawn_window_exec(struct cmd *self, struct cmd_q *cmdq) +cmd_respawn_window_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = self->args; - struct session *s = cmdq->state.tflag.s; - struct winlink *wl = cmdq->state.tflag.wl; + struct session *s = item->state.tflag.s; + struct winlink *wl = item->state.tflag.wl; struct window *w = wl->window; struct window_pane *wp; struct environ *env; @@ -59,7 +60,7 @@ TAILQ_FOREACH(wp, &w->panes, entry) { if (wp->fd == -1) continue; - cmdq_error(cmdq, "window still active: %s:%d", s->name, + cmdq_error(item, "window still active: %s:%d", s->name, wl->idx); return (CMD_RETURN_ERROR); } @@ -78,8 +79,8 @@ window_pane_resize(wp, w->sx, w->sy); path = NULL; - if (cmdq->client != NULL && cmdq->client->session == NULL) - envent = environ_find(cmdq->client->environ, "PATH"); + if (item->client != NULL && item->client->session == NULL) + envent = environ_find(item->client->environ, "PATH"); else envent = environ_find(s->environ, "PATH"); if (envent != NULL) @@ -87,7 +88,7 @@ if (window_pane_spawn(wp, args->argc, args->argv, path, NULL, NULL, env, s->tio, &cause) != 0) { - cmdq_error(cmdq, "respawn window failed: %s", cause); + cmdq_error(item, "respawn window failed: %s", cause); free(cause); environ_free(env); server_destroy_pane(wp, 0);