aboutsummaryrefslogtreecommitdiff
path: root/cmd-choose-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-choose-client.c')
-rw-r--r--cmd-choose-client.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd-choose-client.c b/cmd-choose-client.c
index 7f264520..ce569ff4 100644
--- a/cmd-choose-client.c
+++ b/cmd-choose-client.c
@@ -27,7 +27,7 @@
* Enter choice mode to choose a client.
*/
-enum cmd_retval cmd_choose_client_exec(struct cmd *, struct cmd_ctx *);
+enum cmd_retval cmd_choose_client_exec(struct cmd *, struct cmd_q *);
void cmd_choose_client_callback(struct window_choose_data *);
@@ -46,7 +46,7 @@ struct cmd_choose_client_data {
};
enum cmd_retval
-cmd_choose_client_exec(struct cmd *self, struct cmd_ctx *ctx)
+cmd_choose_client_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
struct client *c;
@@ -57,12 +57,12 @@ cmd_choose_client_exec(struct cmd *self, struct cmd_ctx *ctx)
char *action;
u_int i, idx, cur;
- if ((c = cmd_current_client(ctx)) == NULL) {
- ctx->error(ctx, "no client available");
+ if ((c = cmd_current_client(cmdq)) == NULL) {
+ cmdq_error(cmdq, "no client available");
return (CMD_RETURN_ERROR);
}
- if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL)
+ if ((wl = cmd_find_window(cmdq, args_get(args, 't'), NULL)) == NULL)
return (CMD_RETURN_ERROR);
if (window_pane_set_mode(wl->window->active, &window_choose_mode) != 0)
@@ -81,7 +81,7 @@ cmd_choose_client_exec(struct cmd *self, struct cmd_ctx *ctx)
c1 = ARRAY_ITEM(&clients, i);
if (c1 == NULL || c1->session == NULL)
continue;
- if (c1 == ctx->curclient)
+ if (c1 == cmdq->client)
cur = idx;
idx++;