=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/server.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- src/usr.bin/tmux/server.c 2009/07/21 19:54:22 1.13 +++ src/usr.bin/tmux/server.c 2009/07/24 14:52:47 1.14 @@ -1,4 +1,4 @@ -/* $OpenBSD: server.c,v 1.13 2009/07/21 19:54:22 nicm Exp $ */ +/* $OpenBSD: server.c,v 1.14 2009/07/24 14:52:47 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -802,14 +802,19 @@ if (!(c->flags & CLIENT_PREFIX)) { if (key == prefix) c->flags |= CLIENT_PREFIX; - else - window_pane_key(wp, c, key); + else { + /* Try as a non-prefix key binding. */ + if ((bd = key_bindings_lookup(key)) == NULL) + window_pane_key(wp, c, key); + else + key_bindings_dispatch(bd, c); + } continue; } /* Prefix key already pressed. Reset prefix and lookup key. */ c->flags &= ~CLIENT_PREFIX; - if ((bd = key_bindings_lookup(key)) == NULL) { + if ((bd = key_bindings_lookup(key | KEYC_PREFIX)) == NULL) { /* If repeating, treat this as a key, else ignore. */ if (c->flags & CLIENT_REPEAT) { c->flags &= ~CLIENT_REPEAT;