From 09d57d1f26cb4b8dd8b83ee96a769d63a3ecb9b7 Mon Sep 17 00:00:00 2001 From: Julia Date: Thu, 5 Jan 2023 11:27:50 -0500 Subject: [PATCH] Prefer first max while fuzzy matching projects fixes unexpected behavior --- crates/recent_projects/src/recent_projects.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/recent_projects/src/recent_projects.rs b/crates/recent_projects/src/recent_projects.rs index 42ff2b2f1c..02e15290ab 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);