aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-01-14 22:29:28 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-01-14 22:29:28 +0000
commit4e2b640957b35c53282f491f83569393b8ef5cb6 (patch)
tree86ca2948fee77e37ff88215091ba7bff5b841c5f /server.c
parent78c96751e6dc0bd894b5e38e065d2a317bee620c (diff)
downloadrtmux-4e2b640957b35c53282f491f83569393b8ef5cb6.tar.gz
rtmux-4e2b640957b35c53282f491f83569393b8ef5cb6.tar.bz2
rtmux-4e2b640957b35c53282f491f83569393b8ef5cb6.zip
Unbreak prefix as binding.
Diffstat (limited to 'server.c')
-rw-r--r--server.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/server.c b/server.c
index a568727a..25b27ef9 100644
--- a/server.c
+++ b/server.c
@@ -1,4 +1,4 @@
-/* $Id: server.c,v 1.101 2009-01-14 22:13:30 nicm Exp $ */
+/* $Id: server.c,v 1.102 2009-01-14 22:29:28 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -598,15 +598,12 @@ server_handle_client(struct client *c)
continue;
wp = wl->window->active; /* could die - do each loop */
- /* Prefix key pressed. */
- if (key == prefix) {
- c->flags |= CLIENT_PREFIX;
- continue;
- }
-
- /* Other key and no previous prefix key. */
+ /* No previous prefix key. */
if (!(c->flags & CLIENT_PREFIX)) {
- window_pane_key(wp, c, key);
+ if (key == prefix)
+ c->flags |= CLIENT_PREFIX;
+ else
+ window_pane_key(wp, c, key);
continue;
}
@@ -616,7 +613,10 @@ server_handle_client(struct client *c)
/* If repeating, treat this as a key, else ignore. */
if (c->flags & CLIENT_REPEAT) {
c->flags &= ~CLIENT_REPEAT;
- window_pane_key(wp, c, key);
+ if (key == prefix)
+ c->flags |= CLIENT_PREFIX;
+ else
+ window_pane_key(wp, c, key);
}
continue;
}
@@ -625,7 +625,10 @@ server_handle_client(struct client *c)
/* If already repeating, but this key can't repeat, skip it. */
if (c->flags & CLIENT_REPEAT && !(flags & CMD_CANREPEAT)) {
c->flags &= ~CLIENT_REPEAT;
- window_pane_key(wp, c, key);
+ if (key == prefix)
+ c->flags |= CLIENT_PREFIX;
+ else
+ window_pane_key(wp, c, key);
continue;
}