Ignore the user keys range when checking if a key is Unicode.

This commit is contained in:
nicm 2023-04-17 18:22:24 +00:00
parent 9f605178c3
commit 48eba4c195
2 changed files with 3 additions and 3 deletions

View File

@ -1471,8 +1471,6 @@ process_key:
return (0);
append_key:
if (key <= 0x1f || (key >= KEYC_BASE && key < KEYC_BASE_END))
return (0);
if (key <= 0x7f)
utf8_set(&tmp, key);
else if (KEYC_IS_UNICODE(key))

4
tmux.h
View File

@ -157,7 +157,9 @@ struct winlink;
#define KEYC_IS_UNICODE(key) \
(((key) & KEYC_MASK_KEY) > 0x7f && \
(((key) & KEYC_MASK_KEY) < KEYC_BASE || \
((key) & KEYC_MASK_KEY) >= KEYC_BASE_END))
((key) & KEYC_MASK_KEY) >= KEYC_BASE_END) && \
(((key) & KEYC_MASK_KEY) < KEYC_USER || \
((key) & KEYC_MASK_KEY) >= KEYC_USER + KEYC_NUSER))
/* Multiple click timeout. */
#define KEYC_CLICK_TIMEOUT 300