Skip to content

Commit 39377be

Browse files
authored
Fix logic that determines when to reload a server-side file's contents after save or compile (#1645)
1 parent e20ce56 commit 39377be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/providers/FileSystemProvider/FileSystemProvider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -860,9 +860,9 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
860860
})
861861
.catch(() => compileErrorMsg(conf))
862862
);
863-
if (update && !filesToUpdate.includes(compileList[0])) {
864-
// This file was just written, the write may have changed its contents, and the compilation
865-
// did not change the contents further. Therefore, we must force VS Code to update it.
863+
if (update || (file && filesToUpdate.includes(file.fileName))) {
864+
// This file was just written and the write may have changed its contents or the
865+
// compilation changed its contents. Therefore, we must force VS Code to update it.
866866
this._notifyOfFileChange(uri);
867867
}
868868
// Fire file changed events for all files changed by compilation

0 commit comments

Comments
 (0)