aboutsummaryrefslogtreecommitdiff
path: root/cmd-respawn-pane.c
diff options
context:
space:
mode:
authorThomas Adam <thomas.adam@smoothwall.net>2013-03-25 14:59:29 +0000
committerThomas Adam <thomas.adam@smoothwall.net>2013-03-25 14:59:29 +0000
commitf90eb43fcb12720711ea01b110c5b474111e6600 (patch)
tree43b2e85bcf1626e3810ade10578ac18399931772 /cmd-respawn-pane.c
parent418ba99078a2712ece398e17a5a9bc1f6600126b (diff)
parent58bb6f8c5650d496fb3b872766c0278aa024631d (diff)
downloadrtmux-f90eb43fcb12720711ea01b110c5b474111e6600.tar.gz
rtmux-f90eb43fcb12720711ea01b110c5b474111e6600.tar.bz2
rtmux-f90eb43fcb12720711ea01b110c5b474111e6600.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-respawn-pane.c')
-rw-r--r--cmd-respawn-pane.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd-respawn-pane.c b/cmd-respawn-pane.c
index cf3d9303..4486c91f 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.
*/
-enum cmd_retval cmd_respawn_pane_exec(struct cmd *, struct cmd_ctx *);
+enum cmd_retval cmd_respawn_pane_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_respawn_pane_entry = {
"respawn-pane", "respawnp",
@@ -41,7 +41,7 @@ const struct cmd_entry cmd_respawn_pane_entry = {
};
enum cmd_retval
-cmd_respawn_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
+cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
struct winlink *wl;
@@ -53,14 +53,14 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
char *cause;
u_int idx;
- if ((wl = cmd_find_pane(ctx, args_get(args, 't'), &s, &wp)) == NULL)
+ if ((wl = cmd_find_pane(cmdq, args_get(args, 't'), &s, &wp)) == NULL)
return (CMD_RETURN_ERROR);
w = wl->window;
if (!args_has(self->args, 'k') && wp->fd != -1) {
if (window_pane_index(wp, &idx) != 0)
fatalx("index not found");
- ctx->error(ctx, "pane still active: %s:%u.%u",
+ cmdq_error(cmdq, "pane still active: %s:%u.%u",
s->name, wl->idx, idx);
return (CMD_RETURN_ERROR);
}
@@ -79,7 +79,7 @@ cmd_respawn_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
else
cmd = NULL;
if (window_pane_spawn(wp, cmd, NULL, NULL, &env, s->tio, &cause) != 0) {
- ctx->error(ctx, "respawn pane failed: %s", cause);
+ cmdq_error(cmdq, "respawn pane failed: %s", cause);
free(cause);
environ_free(&env);
return (CMD_RETURN_ERROR);