on master help sign in
sort autocompletins by fuzzy match
c70d762Pascal Kuthe
helix-term/src/ui/menu.rs+1−4
@@ -117,10 +117,7 @@ impl<T: Item> Menu<T> {
117 .map(|score| (index, score))
117 .map(|score| (index, score))
118 }),
118 }),
119 );
119 );
120− // matches.sort_unstable_by_key(|(_, score)| -score);
120+ self.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− });
124
121
125 // reset cursor position
122 // reset cursor position
126 self.cursor = None;
123 self.cursor = None;