diff --git a/cmd.c b/cmd.c index 2bf4d46a..b13d0cc4 100644 --- a/cmd.c +++ b/cmd.c @@ -676,7 +676,7 @@ cmd_find_index(struct cmd_ctx *ctx, const char *arg, struct session **sp) */ if ((s = cmd_current_session(ctx)) == NULL) { ctx->error(ctx, "can't establish current session"); - return (-1); + return (-2); } /* A NULL argument means the current session and "no window" (-1). */