0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 9.0.0954: cannot detect whether modifyOtherKeys is enabled

Problem:    Cannot detect whether modifyOtherKeys is enabled.
Solution:   Use XTQMODKEYS introduced by xterm version 377 to request the
            modifyOtherKeys level.  Update the keycode check results.
This commit is contained in:
Bram Moolenaar
2022-11-26 19:16:48 +00:00
parent 837ca8f43b
commit c255b78965
13 changed files with 201 additions and 33 deletions

View File

@@ -2463,7 +2463,11 @@ check_simplify_modifier(int max_offset)
static int
key_protocol_enabled(void)
{
return seenModifyOtherKeys || kitty_protocol_state == KKPS_ENABLED;
// If xterm has responded to XTQMODKEYS it overrules seenModifyOtherKeys.
int using_mok = modify_otherkeys_state != MOKS_INITIAL
? modify_otherkeys_state == MOKS_ENABLED
: seenModifyOtherKeys;
return using_mok || kitty_protocol_state == KKPS_ENABLED;
}
/*