Skip to content

Commit 63a54ee

Browse files
committed
sort autocompletins by fuzzy match
1 parent 6b16b9d commit 63a54ee

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

helix-term/src/ui/menu.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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;

0 commit comments

Comments
 (0)