language: Assert CodeLabel text ranges are correct (#40242)

Release Notes:

- N/A *or* Added/Fixed/Improved ...
This commit is contained in:
Lukas Wirth
2025-10-15 10:16:56 +00:00
committed by GitHub
parent b0b83ef5aa
commit 3882323f79
21 changed files with 246 additions and 290 deletions
@@ -669,11 +669,7 @@ impl ConsoleQueryBarCompletionProvider {
&snapshot,
),
new_text: string_match.string.clone(),
label: CodeLabel {
filter_range: 0..string_match.string.len(),
text: string_match.string.clone(),
runs: Vec::new(),
},
label: CodeLabel::plain(string_match.string.clone(), None),
icon_path: None,
documentation: Some(CompletionDocumentation::MultiLineMarkdown(
variable_value.into(),
@@ -782,11 +778,7 @@ impl ConsoleQueryBarCompletionProvider {
&snapshot,
),
new_text,
label: CodeLabel {
filter_range: 0..completion.label.len(),
text: completion.label,
runs: Vec::new(),
},
label: CodeLabel::plain(completion.label, None),
icon_path: None,
documentation: completion.detail.map(|detail| {
CompletionDocumentation::MultiLineMarkdown(detail.into())