comparison src/getchar.c @ 28627:da77eb586899 v8.2.4837

patch 8.2.4837: modifiers not simplified when timed out Commit: https://github.com/vim/vim/commit/68a573ce2b996602a86b14d9b258ebb8c657604f Author: zeertzjq <zeertzjq@outlook.com> Date: Thu Apr 28 14:10:01 2022 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Thu, 28 Apr 2022 15:15:03 +0200
parents daad4c7b39be
children fdb18b1122f7
comparison
equal deleted inserted replaced
28626:46322b66ebb6 28627:da77eb586899
2697 * - mapping is allowed, 2697 * - mapping is allowed,
2698 * - keys have not been mapped, 2698 * - keys have not been mapped,
2699 * - and not an ESC sequence, not in insert mode or p_ek is on, 2699 * - and not an ESC sequence, not in insert mode or p_ek is on,
2700 * - and when not timed out, 2700 * - and when not timed out,
2701 */ 2701 */
2702 if ((no_mapping == 0 || allow_keys != 0) 2702 if (no_mapping == 0 || allow_keys != 0)
2703 && (typebuf.tb_maplen == 0 2703 {
2704 if ((typebuf.tb_maplen == 0
2704 || (p_remap && typebuf.tb_noremap[ 2705 || (p_remap && typebuf.tb_noremap[
2705 typebuf.tb_off] == RM_YES)) 2706 typebuf.tb_off] == RM_YES))
2706 && !*timedout) 2707 && !*timedout)
2707 { 2708 keylen = check_termcode(max_mlen + 1, NULL, 0, NULL);
2708 keylen = check_termcode(max_mlen + 1, NULL, 0, NULL); 2709 else
2710 keylen = 0;
2709 2711
2710 // If no termcode matched but 'pastetoggle' matched partially 2712 // If no termcode matched but 'pastetoggle' matched partially
2711 // it's like an incomplete key sequence. 2713 // it's like an incomplete key sequence.
2712 if (keylen == 0 && save_keylen == KEYLEN_PART_KEY) 2714 if (keylen == 0 && save_keylen == KEYLEN_PART_KEY && !*timedout)
2713 keylen = KEYLEN_PART_KEY; 2715 keylen = KEYLEN_PART_KEY;
2714 2716
2715 // If no termcode matched, try to include the modifier into the 2717 // If no termcode matched, try to include the modifier into the
2716 // key. This is for when modifyOtherKeys is working. 2718 // key. This is for when modifyOtherKeys is working.
2717 if (keylen == 0 && !no_reduce_keys) 2719 if (keylen == 0 && !no_reduce_keys)