diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 6167c24bff..d303ecf0f3 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -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 {