mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-06 18:46:49 +00:00
Clear pending keystrokes when finding action
This commit is contained in:
parent
827b16bf5c
commit
d0b5c654aa
1 changed files with 5 additions and 0 deletions
|
@ -202,6 +202,11 @@ impl KeyDispatcher {
|
|||
if let KeyMatch::Some(action) = keystroke_matcher
|
||||
.match_keystroke(&key_down_event.keystroke, self.context_stack.as_slice())
|
||||
{
|
||||
// Clear all pending keystrokes when an action has been found.
|
||||
for keystroke_matcher in self.keystroke_matchers.values_mut() {
|
||||
keystroke_matcher.clear_pending();
|
||||
}
|
||||
|
||||
self.dispatch_action_on_node(*node_id, action, cx);
|
||||
if !cx.propagate_event {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue