diff options
author | nicm <nicm> | 2014-02-10 11:20:41 +0000 |
---|---|---|
committer | nicm <nicm> | 2014-02-10 11:20:41 +0000 |
commit | c52548f6fd311e4df3076ba4cc6f6ab8849557ac (patch) | |
tree | 8b91edfc363982b1159167d75d8dc7b9e770c242 /xterm-keys.c | |
parent | 973de5a704d4858b7626fc7a07865c1ea8f71eac (diff) | |
download | rtmux-c52548f6fd311e4df3076ba4cc6f6ab8849557ac.tar.gz rtmux-c52548f6fd311e4df3076ba4cc6f6ab8849557ac.tar.bz2 rtmux-c52548f6fd311e4df3076ba4cc6f6ab8849557ac.zip |
The last fix to xterm keys meant that some keys such as \033OA were
being wrongly treated as partial matches. So both check xterm keys after
standard keys and only wildcard the minimum required ('1' to
'8'). Problems reported by Ralf Horstmann and Tim van der Molen.
Diffstat (limited to 'xterm-keys.c')
-rw-r--r-- | xterm-keys.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xterm-keys.c b/xterm-keys.c index 9b5a0a21..0e20165b 100644 --- a/xterm-keys.c +++ b/xterm-keys.c @@ -131,7 +131,9 @@ xterm_keys_match(const char *template, const char *buf, size_t len) pos = 0; do { - if (*template != '_' && buf[pos] != *template) + if (*template == '_' && buf[pos] >= '1' && buf[pos] <= '8') + continue; + if (buf[pos] != *template) return (-1); } while (*++template != '\0' && ++pos != len); |