editor: Use completion filter_range for fuzzy matching (#20869)
Fixes regression from #13958 Closes #20868 Release Notes: - N/A
This commit is contained in:
parent
7853e32f80
commit
5c6565a9e0
1 changed files with 6 additions and 1 deletions
|
@ -1036,7 +1036,12 @@ impl CompletionsMenu {
|
||||||
let match_candidates = completions
|
let match_candidates = completions
|
||||||
.iter()
|
.iter()
|
||||||
.enumerate()
|
.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();
|
.collect();
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue