diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-10 17:52:51 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-10 17:52:51 +0000 |
commit | f1ce95915c612ef3b429dc7d2f635b5758b27669 (patch) | |
tree | 4151a79b448c88fb48972a8466f7d19bfd1cbf28 /cmd-choose-buffer.c | |
parent | aadc87f5a79865f404f4b6cb0f4892daa17e7365 (diff) | |
download | rtmux-f1ce95915c612ef3b429dc7d2f635b5758b27669.tar.gz rtmux-f1ce95915c612ef3b429dc7d2f635b5758b27669.tar.bz2 rtmux-f1ce95915c612ef3b429dc7d2f635b5758b27669.zip |
Allow choose commands to be used outside tmux, so long as at least one client
is attached.
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; |