提交 88c21007 编写于 作者: M Matt Bierner

Make sure we always reset bufferSyncSupport when the TS server is started

Splits `reset` from `reinitialize` and makes sure we always `resset` buffer sync support when the service starts
上级 537fcc46
......@@ -401,7 +401,10 @@ export default class BufferSyncSupport extends Disposable {
this.pendingGetErr?.cancel();
this.pendingDiagnostics.clear();
this.synchronizer.reset();
}
public reinitialize(): void {
this.reset();
for (const buffer of this.syncedBuffers.allBuffers) {
buffer.open();
}
......
......@@ -182,8 +182,6 @@ export default class TypeScriptServiceClientHost extends Disposable {
private populateService(): void {
this.fileConfigurationManager.reset();
this.client.bufferSyncSupport.reset();
this.client.bufferSyncSupport.requestAllDiagnostics();
// See https://github.com/Microsoft/TypeScript/issues/5530
vscode.workspace.saveAll(false).then(() => {
......
......@@ -465,6 +465,8 @@ export default class TypeScriptServiceClient extends Disposable implements IType
}
private serviceStarted(resendModels: boolean): void {
this.bufferSyncSupport.reset();
const configureOptions: Proto.ConfigureRequestArguments = {
hostInfo: 'vscode',
preferences: {
......@@ -476,6 +478,8 @@ export default class TypeScriptServiceClient extends Disposable implements IType
this.setCompilerOptionsForInferredProjects(this._configuration);
if (resendModels) {
this._onResendModelsRequested.fire();
this.bufferSyncSupport.reinitialize();
this.bufferSyncSupport.requestAllDiagnostics();
}
// Reconfigure any plugins
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册