summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/server-client.c b/server-client.c
index 1ea1da91..138d9a80 100644
--- a/server-client.c
+++ b/server-client.c
@@ -273,9 +273,7 @@ server_client_handle_key(int key, struct mouse_event *mouse, void *data)
struct options *oo;
struct timeval tv;
struct key_binding *bd;
- struct keylist *keylist;
int xtimeout, isprefix;
- u_int i;
/* Check the client is good to accept input. */
if ((c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED)) != 0)
@@ -360,14 +358,12 @@ server_client_handle_key(int key, struct mouse_event *mouse, void *data)
}
/* Is this a prefix key? */
- keylist = options_get_data(&c->session->options, "prefix");
- isprefix = 0;
- for (i = 0; i < ARRAY_LENGTH(keylist); i++) {
- if (key == ARRAY_ITEM(keylist, i)) {
- isprefix = 1;
- break;
- }
- }
+ if (key == options_get_number(&c->session->options, "prefix"))
+ isprefix = 1;
+ else if (key == options_get_number(&c->session->options, "prefix2"))
+ isprefix = 1;
+ else
+ isprefix = 0;
/* No previous prefix key. */
if (!(c->flags & CLIENT_PREFIX)) {