From ed920e5c8d73c592f8126f5b5a66686e89881532 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 22 Aug 2022 19:13:44 -0700 Subject: [PATCH] Resurrect removal of override_remap broken at 04e94ea9f4ad6084832d0c2f1b3ea1eee95d8f3c --- src/event_handler.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/event_handler.rs b/src/event_handler.rs index de46b86..f1d2267 100644 --- a/src/event_handler.rs +++ b/src/event_handler.rs @@ -250,7 +250,8 @@ impl EventHandler { fn find_keymap(&mut self, config: &Config, key: &Key) -> Result>, Box> { if let Some(override_remap) = &self.override_remap { - if let Some(entries) = override_remap.get(key) { + if let Some(entries) = override_remap.clone().get(key) { + self.remove_override()?; for exact_match in [true, false] { for entry in entries { let (extra_modifiers, missing_modifiers) = self.diff_modifiers(&entry.modifiers); @@ -261,6 +262,8 @@ impl EventHandler { } } } + } else { + self.timeout_override()?; } if let Some(entries) = config.keymap_table.get(key) { for exact_match in [true, false] {