Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Ensure the candidate keybinding matches the correct context
Marshall Bowers3627ff87f008
diff --git a/crates/gpui2/src/key_dispatch.rs b/crates/gpui2/src/key_dispatch.rsindex 5fbf83bfbab..1ab99ec4878 100644--- a/crates/gpui2/src/key_dispatch.rs+++ b/crates/gpui2/src/key_dispatch.rs@@ -167,7 +167,10 @@ impl DispatchTree {self.keymap.lock().bindings_for_action(action.type_id())- .filter(|candidate| candidate.action.partial_eq(action))+ .filter(|candidate| {+ candidate.action.partial_eq(action)+ && candidate.matches_context(&self.context_stack)+ }).cloned().collect()}