mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Fix request position of the inlay hints
Fixes #129134 The document may change between the request and when `ensureConfigurationForDocument` completes I think this should fix the shifting around
This commit is contained in:
@@ -117,11 +117,11 @@ class TypeScriptInlayHintsProvider extends Disposable implements vscode.InlayHin
|
||||
return [];
|
||||
}
|
||||
|
||||
await this.fileConfigurationManager.ensureConfigurationForDocument(model, token);
|
||||
|
||||
const start = model.offsetAt(range.start);
|
||||
const length = model.offsetAt(range.end) - start;
|
||||
|
||||
await this.fileConfigurationManager.ensureConfigurationForDocument(model, token);
|
||||
|
||||
const response = await (this.client as ExperimentalProto.IExtendedTypeScriptServiceClient).execute('provideInlayHints', { file: filepath, start, length }, token);
|
||||
if (response.type !== 'response' || !response.success || !response.body) {
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user