Fix the issue where commands without a keymap would disappear. (#3504)

This commit is contained in:
ifengqi 2024-09-16 17:38:54 +08:00 committed by GitHub
parent a84ea98837
commit 2773c5c9ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -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());
}
}