From 021037c419b2044f5ba6f9596cc86923ab130309 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 22 Mar 2010 19:03:52 +0000 Subject: [PATCH] Accept a full key match (not a partial) even if there is data left in the buffer. --- tty-keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. */