aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-03-28 14:08:09 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-03-28 14:08:09 +0000
commitcb2ac5c269d42d1f95e6dc6e5585c4ac01a360e4 (patch)
tree073904bbde12e7de88bf481cb50ca29436251a89 /server.c
parent587badecdb4eed64835e076a589631ceda3bcae5 (diff)
downloadrtmux-cb2ac5c269d42d1f95e6dc6e5585c4ac01a360e4.tar.gz
rtmux-cb2ac5c269d42d1f95e6dc6e5585c4ac01a360e4.tar.bz2
rtmux-cb2ac5c269d42d1f95e6dc6e5585c4ac01a360e4.zip
Key repeating is now a property of the key binding not of the command. Repeat
is turned on when the key is bound with the -r flag to bind-key. next/previous- window no longer repeat by default as it turned out to annoy me.
Diffstat (limited to 'server.c')
-rw-r--r--server.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/server.c b/server.c
index 9493073e..8f13f7da 100644
--- a/server.c
+++ b/server.c
@@ -1,4 +1,4 @@
-/* $Id: server.c,v 1.129 2009-03-27 17:04:04 nicm Exp $ */
+/* $Id: server.c,v 1.130 2009-03-28 14:08:09 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -690,7 +690,7 @@ server_handle_client(struct client *c)
struct timeval tv;
struct key_binding *bd;
struct cmd *cmd;
- int key, prefix, status, xtimeout, can_repeat;
+ int key, prefix, status, xtimeout;
int mode;
u_char mouse[3];
@@ -748,15 +748,8 @@ server_handle_client(struct client *c)
continue;
}
- /* Check repeat flag. */
- can_repeat = 1;
- TAILQ_FOREACH(cmd, bd->cmdlist, qentry) {
- if (!(cmd->entry->flags & CMD_CANREPEAT))
- can_repeat = 0;
- }
-
/* If already repeating, but this key can't repeat, skip it. */
- if (c->flags & CLIENT_REPEAT && !can_repeat) {
+ if (c->flags & CLIENT_REPEAT && !bd->can_repeat) {
c->flags &= ~CLIENT_REPEAT;
if (key == prefix)
c->flags |= CLIENT_PREFIX;
@@ -766,7 +759,7 @@ server_handle_client(struct client *c)
}
/* If this key can repeat, reset the repeat flags and timer. */
- if (xtimeout != 0 && can_repeat) {
+ if (xtimeout != 0 && bd->can_repeat) {
c->flags |= CLIENT_PREFIX|CLIENT_REPEAT;
tv.tv_sec = xtimeout / 1000;