Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Change context matcher to search the entire stack
Mikayla Maki0384456e7d05
diff --git a/crates/gpui/src/keymap_matcher/keymap_context.rs b/crates/gpui/src/keymap_matcher/keymap_context.rsindex bbf6bfc14ba..fbaaa5fbc5d 100644--- a/crates/gpui/src/keymap_matcher/keymap_context.rs+++ b/crates/gpui/src/keymap_matcher/keymap_context.rs@@ -64,7 +64,13 @@ impl KeymapContextPredicate {pub fn eval(&self, contexts: &[KeymapContext]) -> bool {let Some(context) = contexts.first() else { return false };match self {- Self::Identifier(name) => (&context.set).contains(name.as_str()),+ Self::Identifier(name) => {+ if (&context.set).contains(name.as_str()) {+ true+ } else {+ self.eval(&contexts[1..])+ }+ }Self::Equal(left, right) => context.map.get(left.as_str())