Merge pull request #2027 from zed-industries/fix-keybindings-in-command-palette

Fix bug where keybindings would not show in command palette
This commit is contained in:
Mikayla Maki 2023-01-11 16:40:04 -08:00 committed by GitHub
commit 24ef80f4b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,7 +43,7 @@ impl Keymap {
pub(crate) fn add_bindings<T: IntoIterator<Item = Binding>>(&mut self, bindings: T) { pub(crate) fn add_bindings<T: IntoIterator<Item = Binding>>(&mut self, bindings: T) {
for binding in bindings { for binding in bindings {
self.binding_indices_by_action_type self.binding_indices_by_action_type
.entry(binding.action().type_id()) .entry(binding.action().as_any().type_id())
.or_default() .or_default()
.push(self.bindings.len()); .push(self.bindings.len());
self.bindings.push(binding); self.bindings.push(binding);