diff options
Diffstat (limited to 'cmd-choose-client.c')
| -rw-r--r-- | cmd-choose-client.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd-choose-client.c b/cmd-choose-client.c index 0c1eb070..7f264520 100644 --- a/cmd-choose-client.c +++ b/cmd-choose-client.c @@ -57,11 +57,10 @@ cmd_choose_client_exec(struct cmd *self, struct cmd_ctx *ctx) char *action; u_int i, idx, cur; - if (ctx->curclient == NULL) { - ctx->error(ctx, "must be run interactively"); + if ((c = cmd_current_client(ctx)) == NULL) { + ctx->error(ctx, "no client available"); return (CMD_RETURN_ERROR); } - c = ctx->curclient; if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL) return (CMD_RETURN_ERROR); |