Unbreak prefix as binding.

This commit is contained in:
Nicholas Marriott 2009-01-14 22:29:28 +00:00
parent 78c96751e6
commit 4e2b640957

View File

@ -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;
}