From d855d1a2e66654105218b583317447bf900f3a67 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Fri, 3 May 2024 08:56:11 +0200 Subject: [PATCH] Interpret escape as alt only if it's the escape byte No need to take this code path when an unambiguous, prefix-free encoding is used for the escape key. --- src/input.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input.rs b/src/input.rs index ec3e1915c..dbd19acbd 100644 --- a/src/input.rs +++ b/src/input.rs @@ -683,7 +683,7 @@ fn next_is_char(&mut self, style: &KeyNameStyle, key: Key, escaped: bool) -> boo return false; }; if WAIT_ON_ESCAPE_MS.load(Ordering::Relaxed) != 0 - && kevt.key == Key::from_raw(key::Escape) + && kevt.seq == L!("\x1b") && key.modifiers == Modifiers::ALT { self.idx += 1;