From 63a54ee19b522cb0b085f1da0f3dfe07174179d5 Mon Sep 17 00:00:00 2001 From: Pascal Kuthe Date: Fri, 7 Oct 2022 12:15:52 +0200 Subject: [PATCH] sort autocompletins by fuzzy match --- helix-term/src/ui/menu.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs index 4a9670bd7c60..ee11bfbcfb50 100644 --- a/helix-term/src/ui/menu.rs +++ b/helix-term/src/ui/menu.rs @@ -117,10 +117,7 @@ impl Menu { .map(|score| (index, score)) }), ); - // matches.sort_unstable_by_key(|(_, score)| -score); - self.matches.sort_unstable_by_key(|(index, _score)| { - self.options[*index].sort_text(&self.editor_data) - }); + self.matches.sort_unstable_by_key(|(_, score)| -score); // reset cursor position self.cursor = None;