summaryrefslogtreecommitdiffstats
path: root/server-client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2013-03-21 16:14:09 +0000
committerNicholas Marriott <nicm@openbsd.org>2013-03-21 16:14:09 +0000
commit63b4fd5cacc1a53b93e92ef007d5a7249f5cac38 (patch)
treeefe04a456d3a8cda3f84611174e33caf0f74a9cf /server-client.c
parentdd76497ab01620bf5c7b63205f3e1405f3c34d8c (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 82189a5c..1cae4733 100644
--- a/server-client.c
+++ b/server-client.c
@@ -418,6 +418,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;
}
@@ -432,6 +433,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) {
@@ -587,8 +589,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. */