fixed binding fallback

This commit is contained in:
K Simmons 2022-10-27 12:33:51 -07:00
parent 8d94de8eb2
commit e02199fa2a
2 changed files with 64 additions and 73 deletions

View file

@ -1551,17 +1551,18 @@ impl MutableAppContext {
{
MatchResult::None => false,
MatchResult::Pending => true,
MatchResult::Match { view_id, action } => {
if self.handle_dispatch_action_from_effect(
window_id,
Some(view_id),
action.as_ref(),
) {
self.keystroke_matcher.clear_pending();
true
} else {
false
MatchResult::Matches(matches) => {
for (view_id, action) in matches {
if self.handle_dispatch_action_from_effect(
window_id,
Some(view_id),
action.as_ref(),
) {
self.keystroke_matcher.clear_pending();
return true;
}
}
false
}
}
} else {