Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Clear all the state when clearing KeyDispatcher

Antonio Scandurra45fef27aa180
diff --git a/crates/gpui2/src/key_dispatch.rs b/crates/gpui2/src/key_dispatch.rs
index e44dc51c058..b0f4a5d8d23 100644
--- a/crates/gpui2/src/key_dispatch.rs
+++ b/crates/gpui2/src/key_dispatch.rs
@@ -58,6 +58,9 @@ impl KeyDispatcher {
pub fn clear(&mut self) {
self.node_stack.clear();
self.nodes.clear();
+ self.context_stack.clear();
+ self.focusable_node_ids.clear();
+ self.keystroke_matchers.clear();
}
pub fn push_node(&mut self, context: KeyContext, old_dispatcher: &mut Self) {