mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 02:48:34 +00:00
Change context matcher to search the entire stack
This commit is contained in:
parent
e7af3f223a
commit
0384456e7d
1 changed files with 7 additions and 1 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue