aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorPascal Kuthe2022-10-07 10:15:52 +0000
committerBlaž Hrastnik2022-10-21 01:03:00 +0000
commitc70d762a7b6285684dd7c5f39a53f05394369981 (patch)
tree36375199ff6592f7ea390aa401c103753a30ba1c /helix-term
parent8673c1ec0cb4074a1082d4681b655110d5b7facb (diff)
sort autocompletins by fuzzy match
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/ui/menu.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs
index b60e6454..f7712e4d 100644
--- a/helix-term/src/ui/menu.rs
+++ b/helix-term/src/ui/menu.rs
@@ -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;