Make sure we close old resource on ts server for path updates

Fixes #53466
This commit is contained in:
Matt Bierner
2018-10-05 13:55:11 -07:00
parent 03ed0959ee
commit 696fc1b48e

View File

@@ -78,7 +78,7 @@ class UpdateImportsOnFileRenameHandler {
}
// Make sure TS knows about file
this.client.bufferSyncSupport.closeResource(targetResource);
this.client.bufferSyncSupport.closeResource(oldResource);
this.client.bufferSyncSupport.openTextDocument(document);
if (this.client.apiVersion.lt(API.v300) && !fs.lstatSync(newResource.fsPath).isDirectory()) {