Ensure the candidate keybinding matches the correct context

This commit is contained in:
Marshall Bowers
2023-12-04 15:53:38 -05:00
parent b212aab00d
commit 3627ff87f0
+4 -1
View File
@@ -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()
}