summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2013-02-10 18:58:05 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2013-02-10 18:58:05 +0000
commit06ac4b628dfb581eaad29e8a33859ab9bb07f8bb (patch)
tree04873d0b7424fbf28e74b15850edc3cef8785f72 /server-client.c
parent6c53a1ed684e0e149679e7df3365d8d6f41d4cdc (diff)
Add a format client_prefix which is 1 if prefix key has been pressed, used for
example #{?client_prefix,X,Y}. Also a few extra server_client_status needed.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/server-client.c b/server-client.c
index 796390f7..e683a206 100644
--- a/server-client.c
+++ b/server-client.c
@@ -417,6 +417,7 @@ server_client_handle_key(struct client *c, int key)
if (!(c->flags & CLIENT_PREFIX)) {
if (isprefix) {
c->flags |= CLIENT_PREFIX;
+ server_status_client(c);
return;
}
@@ -431,6 +432,7 @@ server_client_handle_key(struct client *c, int key)
/* Prefix key already pressed. Reset prefix and lookup key. */
c->flags &= ~CLIENT_PREFIX;
+ server_status_client(c);
if ((bd = key_bindings_lookup(key | KEYC_PREFIX)) == NULL) {
/* If repeating, treat this as a key, else ignore. */
if (c->flags & CLIENT_REPEAT) {
@@ -586,8 +588,11 @@ server_client_repeat_timer(unused int fd, unused short events, void *data)
{
struct client *c = data;
- if (c->flags & CLIENT_REPEAT)
+ if (c->flags & CLIENT_REPEAT) {
+ if (c->flags & CLIENT_PREFIX)
+ server_status_client(c);
c->flags &= ~(CLIENT_PREFIX|CLIENT_REPEAT);
+ }
}
/* Check if client should be exited. */