Skip to content

Commit

Permalink
editor: Use completion filter_range for fuzzy matching (#20869)
Browse files Browse the repository at this point in the history
Fixes regression from #13958

Closes #20868

Release Notes:

- N/A
  • Loading branch information
osiewicz authored Nov 19, 2024
1 parent 7853e32 commit 5c6565a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/editor/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,12 @@ impl CompletionsMenu {
let match_candidates = completions
.iter()
.enumerate()
.map(|(id, completion)| StringMatchCandidate::new(id, completion.label.text.clone()))
.map(|(id, completion)| {
StringMatchCandidate::new(
id,
completion.label.text[completion.label.filter_range.clone()].into(),
)
})
.collect();

Self {
Expand Down

0 comments on commit 5c6565a

Please sign in to comment.