diff options
Diffstat (limited to 'cmd-choose-buffer.c')
-rw-r--r-- | cmd-choose-buffer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd-choose-buffer.c b/cmd-choose-buffer.c index c002196c..a7fc52a6 100644 --- a/cmd-choose-buffer.c +++ b/cmd-choose-buffer.c @@ -51,11 +51,10 @@ cmd_choose_buffer_exec(struct cmd *self, struct cmd_ctx *ctx) const char *template; u_int idx; - 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 ((template = args_get(args, 'F')) == NULL) template = CHOOSE_BUFFER_TEMPLATE; |