From 68a573ce2b996602a86b14d9b258ebb8c657604f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 28 Apr 2022 14:10:01 +0100 Subject: patch 8.2.4837: modifiers not simplified when timed out Problem: Modifiers not simplified when timed out or using feedkeys() with 'n" flag. Solution: Adjust how mapped flag and timeout are used. (closes #10305) --- src/getchar.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/getchar.c') 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 -- cgit v1.2.3