Skip to content

Commit 9f8c3eb

Browse files
committed
fixup! feat: sort in rust when no lua sorts provided
1 parent 9423198 commit 9f8c3eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/blink/cmp/fuzzy/rust/fuzzy.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ pub fn fuzzy(
150150
if let Some(sorts) = opts.sorts {
151151
matches.sort_by(|a, b| {
152152
sorts.iter().fold(Ordering::Equal, |acc, sort| {
153+
if acc != Ordering::Equal {
154+
return acc;
155+
}
156+
153157
let item_a = &haystack[a.index_in_haystack as usize];
154158
let item_b = &haystack[b.index_in_haystack as usize];
155159
match sort {

0 commit comments

Comments
 (0)