From 2773c5c9ff45634dceb788ba1ac953a8efa4a25c Mon Sep 17 00:00:00 2001 From: ifengqi <362254883@qq.com> Date: Mon, 16 Sep 2024 17:38:54 +0800 Subject: [PATCH] Fix the issue where commands without a keymap would disappear. (#3504) --- lapce-app/src/keypress.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lapce-app/src/keypress.rs b/lapce-app/src/keypress.rs index 78a6753c..a22b4604 100644 --- a/lapce-app/src/keypress.rs +++ b/lapce-app/src/keypress.rs @@ -192,7 +192,12 @@ fn load_commands(&mut self) { } for (_, cmd) in self.commands.iter() { - if !self.command_keymaps.contains_key(cmd.kind.str()) { + if self + .command_keymaps + .get(cmd.kind.str()) + .map(|x| x.is_empty()) + .unwrap_or(true) + { commands_without_keymap.push(cmd.clone()); } }