From 5ce35abae6427dac7ac2b147bae8f16adcd8ddff Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 4 Nov 2021 21:43:05 +0800 Subject: fix(input): never reinterpret unmapped ALT- chrods in Terminal mode (#16222) --- src/nvim/getchar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim') diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index a374406716..a04914efd5 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -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 // as 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); -- cgit