summaryrefslogtreecommitdiffstats
path: root/key-bindings.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-02 18:08:17 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-02 18:08:17 +0000
commitc7243b73cb3baaf6993d8a9dfb16c054c3978040 (patch)
tree1d67ee4c5cf764dc83245c79d27da52857b4a89d /key-bindings.c
parent11ee55e755af67dc9155e956b4569c8fdeb11848 (diff)
Move -s and -c down a level so handling them is the responsibility of the command (with some helper functions), rather than the top-level. This changes the action command syntax so that -s and -c must be after the command rather than before.
Diffstat (limited to 'key-bindings.c')
-rw-r--r--key-bindings.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/key-bindings.c b/key-bindings.c
index 8acf71f1..96a220f2 100644
--- a/key-bindings.c
+++ b/key-bindings.c
@@ -1,4 +1,4 @@
-/* $Id: key-bindings.c,v 1.25 2007-12-06 21:42:00 nicm Exp $ */
+/* $Id: key-bindings.c,v 1.26 2008-06-02 18:08:16 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -155,14 +155,14 @@ key_bindings_error(struct cmd_ctx *ctx, const char *fmt, ...)
va_end(ap);
*msg = toupper((u_char) *msg);
- server_write_message(ctx->client, "%s", msg);
+ server_write_message(ctx->curclient, "%s", msg);
xfree(msg);
}
void printflike2
key_bindings_print(struct cmd_ctx *ctx, const char *fmt, ...)
{
- struct window *w = ctx->session->curw->window;
+ struct window *w = ctx->cursession->curw->window;
va_list ap;
window_set_mode(w, &window_more_mode);
@@ -188,8 +188,8 @@ key_bindings_dispatch(int key, struct client *c)
if (i == ARRAY_LENGTH(&key_bindings))
return;
- ctx.session = c->session;
- ctx.client = c;
+ ctx.cursession = c->session;
+ ctx.curclient = c;
ctx.error = key_bindings_error;
ctx.print = key_bindings_print;