diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-28 14:10:01 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-28 14:10:01 +0100 |
commit | 68a573ce2b996602a86b14d9b258ebb8c657604f (patch) | |
tree | a0a08156c88385348b2b0728aa60d00ada4b4640 /src/getchar.c | |
parent | f6ced9863f931758a4cee0b6546e77d21150806d (diff) |
patch 8.2.4837: modifiers not simplified when timed outv8.2.4837
Problem: Modifiers not simplified when timed out or using feedkeys() with
'n" flag.
Solution: Adjust how mapped flag and timeout are used. (closes #10305)
Diffstat (limited to 'src/getchar.c')
-rw-r--r-- | src/getchar.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/getchar.c b/src/getchar.c index e6879c60d9..2b1bbde4b0 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -2699,17 +2699,19 @@ handle_mapping( * - and not an ESC sequence, not in insert mode or p_ek is on, * - and when not timed out, */ - if ((no_mapping == 0 || allow_keys != 0) - && (typebuf.tb_maplen == 0 + if (no_mapping == 0 || allow_keys != 0) + { + if ((typebuf.tb_maplen == 0 || (p_remap && typebuf.tb_noremap[ typebuf.tb_off] == RM_YES)) && !*timedout) - { - keylen = check_termcode(max_mlen + 1, NULL, 0, NULL); + keylen = check_termcode(max_mlen + 1, NULL, 0, NULL); + else + keylen = 0; // If no termcode matched but 'pastetoggle' matched partially // it's like an incomplete key sequence. - if (keylen == 0 && save_keylen == KEYLEN_PART_KEY) + if (keylen == 0 && save_keylen == KEYLEN_PART_KEY && !*timedout) keylen = KEYLEN_PART_KEY; // If no termcode matched, try to include the modifier into the |