fix(input): remove reinterpreted ALT/META chords from recorded macro

This commit is contained in:
zeertzjq
2022-01-29 06:05:14 +08:00
parent af9a2a201d
commit 75f4741db9
2 changed files with 19 additions and 2 deletions

View File

@@ -1598,8 +1598,9 @@ int vgetc(void)
if (!no_mapping && KeyTyped && !(State & TERM_FOCUS)
&& (mod_mask == MOD_MASK_ALT || mod_mask == MOD_MASK_META)) {
mod_mask = 0;
ins_char_typebuf(c, 0);
ins_char_typebuf(ESC, 0);
int len = ins_char_typebuf(c, 0);
(void)ins_char_typebuf(ESC, 0);
ungetchars(len + 3); // The ALT/META modifier takes three more bytes
continue;
}