diff options
author | Thomas Adam <thomas@xteddy.org> | 2016-10-16 22:01:14 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2016-10-16 22:01:14 +0100 |
commit | 1a6e696b08113ca17ee8e881844167cf94276846 (patch) | |
tree | 60ecdd8c9e51bff46624e48d9373686b858d2fb1 /cmd-respawn-pane.c | |
parent | d401340c516131ae8e07bfb978b670347486d077 (diff) | |
parent | d15d54c2c8e6b95695169442eb2a27d814efc078 (diff) | |
download | rtmux-1a6e696b08113ca17ee8e881844167cf94276846.tar.gz rtmux-1a6e696b08113ca17ee8e881844167cf94276846.tar.bz2 rtmux-1a6e696b08113ca17ee8e881844167cf94276846.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-respawn-pane.c')
-rw-r--r-- | cmd-respawn-pane.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cmd-respawn-pane.c b/cmd-respawn-pane.c index 3a7c8090..b95fc596 100644 --- a/cmd-respawn-pane.c +++ b/cmd-respawn-pane.c @@ -28,7 +28,7 @@ * Respawn a pane (restart the command). Kill existing if -k given. */ -static enum cmd_retval cmd_respawn_pane_exec(struct cmd *, struct cmd_q *); +static enum cmd_retval cmd_respawn_pane_exec(struct cmd *, struct cmdq_item *); const struct cmd_entry cmd_respawn_pane_entry = { .name = "respawn-pane", @@ -44,13 +44,13 @@ const struct cmd_entry cmd_respawn_pane_entry = { }; static enum cmd_retval -cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq) +cmd_respawn_pane_exec(struct cmd *self, struct cmdq_item *item) { struct args *args = self->args; - struct winlink *wl = cmdq->state.tflag.wl; + struct winlink *wl = item->state.tflag.wl; struct window *w = wl->window; - struct window_pane *wp = cmdq->state.tflag.wp; - struct session *s = cmdq->state.tflag.s; + struct window_pane *wp = item->state.tflag.wp; + struct session *s = item->state.tflag.s; struct environ *env; const char *path; char *cause; @@ -60,7 +60,7 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq) if (!args_has(self->args, 'k') && wp->fd != -1) { if (window_pane_index(wp, &idx) != 0) fatalx("index not found"); - cmdq_error(cmdq, "pane still active: %s:%d.%u", + cmdq_error(item, "pane still active: %s:%d.%u", s->name, wl->idx, idx); return (CMD_RETURN_ERROR); } @@ -75,8 +75,8 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq) input_init(wp); 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) @@ -84,7 +84,7 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq) if (window_pane_spawn(wp, args->argc, args->argv, path, NULL, NULL, env, s->tio, &cause) != 0) { - cmdq_error(cmdq, "respawn pane failed: %s", cause); + cmdq_error(item, "respawn pane failed: %s", cause); free(cause); environ_free(env); return (CMD_RETURN_ERROR); |