summaryrefslogtreecommitdiffstats
path: root/tty-keys.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2010-03-22 19:03:52 +0000
committerNicholas Marriott <nicm@openbsd.org>2010-03-22 19:03:52 +0000
commit021037c419b2044f5ba6f9596cc86923ab130309 (patch)
treed397773bc6e0a8cb1422e673e2334c3229c6ffd2 /tty-keys.c
parent4baafd81262a2b1961e9b710b6f9c9cff9b2b828 (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tty-keys.c b/tty-keys.c
index 9404ef0a..27107bb8 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -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. */