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.

Prefer first max while fuzzy matching projects fixes unexpected behavior

Julia09d57d1f26cb
diff --git a/crates/recent_projects/src/recent_projects.rs b/crates/recent_projects/src/recent_projects.rs
index 42ff2b2f1c3..02e15290ab2 100644
--- a/crates/recent_projects/src/recent_projects.rs
+++ b/crates/recent_projects/src/recent_projects.rs
@@ -146,6 +146,7 @@ impl PickerDelegate for RecentProjectsView {
.matches
.iter()
.enumerate()
+ .rev()
.max_by_key(|(_, m)| OrderedFloat(m.score))
.map(|(ix, _)| ix)
.unwrap_or(0);