mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
simplify API
This commit is contained in:
@@ -15,7 +15,7 @@ import {wireCancellationToken} from 'vs/base/common/async';
|
||||
import {CancellationToken} from 'vs/base/common/cancellation';
|
||||
import {Position as EditorPosition} from 'vs/editor/common/core/position';
|
||||
import {Range as EditorRange} from 'vs/editor/common/core/range';
|
||||
import {ExtHostContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape} from './extHost.protocol';
|
||||
import {ExtHostContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape, ObjectIdentifier} from './extHost.protocol';
|
||||
import {LanguageConfigurationRegistry, LanguageConfiguration} from 'vs/editor/common/modes/languageConfigurationRegistry';
|
||||
import {trackGarbageCollection} from 'gc-signals';
|
||||
|
||||
@@ -183,7 +183,7 @@ export class MainThreadLanguageFeatures extends MainThreadLanguageFeaturesShape
|
||||
provideCompletionItems: (model:IReadOnlyModel, position:EditorPosition, token:CancellationToken): Thenable<modes.ISuggestResult> => {
|
||||
return wireCancellationToken(token, this._proxy.$provideCompletionItems(handle, model.uri, position)).then(result => {
|
||||
for (const suggestion of result.suggestions) {
|
||||
trackGarbageCollection(suggestion, (<any>suggestion).$heap_ident);
|
||||
trackGarbageCollection(suggestion, ObjectIdentifier.get(suggestion));
|
||||
}
|
||||
return result;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user