fix(input): never reinterpret unmapped ALT- chrods in Terminal mode (#16222)

This commit is contained in:
zeertzjq
2021-11-04 21:43:05 +08:00
committed by GitHub
parent fd347840ba
commit 5ce35abae6
2 changed files with 30 additions and 1 deletions

View File

@@ -1579,7 +1579,8 @@ int vgetc(void)
// If mappings are enabled (i.e., not Ctrl-v) and the user directly typed
// something with a meta- or alt- modifier that was not mapped, interpret
// <M-x> as <Esc>x rather than as an unbound meta keypress. #8213
if (!no_mapping && KeyTyped
// In Terminal mode, however, this is not desirable. #16220
if (!no_mapping && KeyTyped && !(State & TERM_FOCUS)
&& (mod_mask == MOD_MASK_ALT || mod_mask == MOD_MASK_META)) {
mod_mask = 0;
ins_char_typebuf(c);