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.

further tweak comment

Kay Simmons0981244797e3
diff --git a/crates/gpui/src/keymap_matcher.rs b/crates/gpui/src/keymap_matcher.rs
index 26da099a9fc..cfc26d6869e 100644
--- a/crates/gpui/src/keymap_matcher.rs
+++ b/crates/gpui/src/keymap_matcher.rs
@@ -76,8 +76,10 @@ impl KeymapMatcher {
mut dispatch_path: Vec<(usize, KeymapContext)>,
) -> MatchResult {
let mut any_pending = false;
- // Collect matched bindings into an ordered list using the position in the bindings
- // list as the precedence
+ // Collect matched bindings into an ordered list using the position in the matching binding first,
+ // and then the order the binding matched in the view tree second.
+ // The key is the reverse position of the binding in the bindings list so that later bindings
+ // match before earlier ones in the user's config
let mut matched_bindings: BTreeMap<usize, Vec<(usize, Box<dyn Action>)>> =
Default::default();