on master help sign in
sort autocompletins by fuzzy match
commitc70d762a7b6285684dd7c5f39a53f05394369981 authorPascal Kuthe <pascal.kuthe@semimod.de> dateFri 7 Oct 2022, 12:15 (4 years ago) parent8673c1e
1 file changed+1−4
helix-term/src/ui/menu.rs+1−4
helix-term/src/ui/menu.rs+1−4
@@ -117,10 +117,7 @@ impl<T: Item> Menu<T> {
117117 .map(|score| (index, score))
118118 }),
119119 );
120− // matches.sort_unstable_by_key(|(_, score)| -score);
121− self.matches.sort_unstable_by_key(|(index, _score)| {
122− self.options[*index].sort_text(&self.editor_data)
123− });
120+ self.matches.sort_unstable_by_key(|(_, score)| -score);
124121
125122 // reset cursor position
126123 self.cursor = None;