aboutsummaryrefslogtreecommitdiff
path: root/tty-keys.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2010-03-15 20:44:51 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2010-03-15 20:44:51 +0000
commit4de04fac2c9863e7ed972500d2dcc5f7d6d98e3c (patch)
tree1cbea3d969a16a6dceba42f4abd0466b503c4982 /tty-keys.c
parent593bcbdd497a8dadd44abdfabf4acfa808d5d076 (diff)
downloadrtmux-4de04fac2c9863e7ed972500d2dcc5f7d6d98e3c.tar.gz
rtmux-4de04fac2c9863e7ed972500d2dcc5f7d6d98e3c.tar.bz2
rtmux-4de04fac2c9863e7ed972500d2dcc5f7d6d98e3c.zip
Accept a full key match (not a partial) even if there is data left in
the buffer.
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tty-keys.c b/tty-keys.c
index 4a6c9f7d..f2460dd6 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -1,4 +1,4 @@
-/* $Id: tty-keys.c,v 1.55 2009-12-18 18:57:00 tcunha Exp $ */
+/* $Id: tty-keys.c,v 1.56 2010-03-15 20:44:51 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -408,7 +408,7 @@ tty_keys_find1(struct tty_key *tk, const char *buf, size_t len, size_t *size)
(*size)++;
/* At the end of the string, return the current node. */
- if (len == 0)
+ if (len == 0 || (tk->next == NULL && tk->key != KEYC_NONE))
return (tk);
/* Move into the next tree for the following character. */