mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Handle unknown keys more gracefully, return a string instead of NULL.
This commit is contained in:
@ -238,8 +238,10 @@ key_string_lookup_key(int key)
|
||||
}
|
||||
|
||||
/* Invalid keys are errors. */
|
||||
if (key == 127 || key > 255)
|
||||
return (NULL);
|
||||
if (key == 127 || key > 255) {
|
||||
snprintf(out, sizeof out, "<INVALID#%04x>", key);
|
||||
return (out);
|
||||
}
|
||||
|
||||
/* Check for standard or control key. */
|
||||
if (key >= 0 && key <= 32) {
|
||||
|
Reference in New Issue
Block a user