cmd_find_index should return -2 on error.

pull/1/head
Nicholas Marriott 2009-07-24 18:46:40 +00:00
parent 029599c02c
commit c6dac5c3c9
1 changed files with 1 additions and 1 deletions

2
cmd.c
View File

@ -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). */