mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
Fix optionalReplacementSpan not being applied to completion entries (#200945)
* Fix optionalReplacementSpan not being applied to completion entries * Format completions.ts
This commit is contained in:
@@ -760,6 +760,12 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider<
|
||||
isIncomplete = !!response.body.isIncomplete || (response as any).metadata && (response as any).metadata.isIncomplete;
|
||||
entries = response.body.entries;
|
||||
metadata = response.metadata;
|
||||
|
||||
if (response.body.optionalReplacementSpan) {
|
||||
for (const entry of entries) {
|
||||
entry.replacementSpan ??= response.body.optionalReplacementSpan;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const response = await this.client.interruptGetErr(() => this.client.execute('completions', args, token));
|
||||
if (response.type !== 'response' || !response.body) {
|
||||
|
||||
Reference in New Issue
Block a user