summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/cmd-choose-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-choose-client.c')
-rw-r--r--usr.bin/tmux/cmd-choose-client.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd-choose-client.c b/usr.bin/tmux/cmd-choose-client.c
index 53aaefcad48..857b8a15a4b 100644
--- a/usr.bin/tmux/cmd-choose-client.c
+++ b/usr.bin/tmux/cmd-choose-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-client.c,v 1.16 2013/03/21 16:09:59 nicm Exp $ */
+/* $OpenBSD: cmd-choose-client.c,v 1.17 2013/03/24 09:54:10 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -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++;