Merge pull request #2007 from zed-industries/recent-projects-prefer-first-match

Prefer first max while fuzzy matching projects fixes unexpected behavior
This commit is contained in:
Julia
2023-01-05 12:10:51 -05:00
committed by GitHub
@@ -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);