sort autocompletins by fuzzy match

pull/6/head
Pascal Kuthe 2 years ago
parent 6b16b9dfc8
commit 63a54ee19b
No known key found for this signature in database
GPG Key ID: D715E8655AE166A6

@ -117,10 +117,7 @@ impl<T: Item> Menu<T> {
.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;

Loading…
Cancel
Save