mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
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.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user