mirror of https://github.com/helix-editor/helix
sort autocompletins by fuzzy match
parent
8673c1ec0c
commit
c70d762a7b
|
@ -117,10 +117,7 @@ impl<T: Item> Menu<T> {
|
||||||
.map(|score| (index, score))
|
.map(|score| (index, score))
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
// matches.sort_unstable_by_key(|(_, score)| -score);
|
self.matches.sort_unstable_by_key(|(_, score)| -score);
|
||||||
self.matches.sort_unstable_by_key(|(index, _score)| {
|
|
||||||
self.options[*index].sort_text(&self.editor_data)
|
|
||||||
});
|
|
||||||
|
|
||||||
// reset cursor position
|
// reset cursor position
|
||||||
self.cursor = None;
|
self.cursor = None;
|
||||||
|
|
Loading…
Reference in New Issue