Skip to content

Commit cf88a42

Browse files
committed
Trigger reload of any objectscript:// document after import
1 parent 4cada5b commit cf88a42

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/commands/compile.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@ async function importFile(file: CurrentFile, ignoreConflict?: boolean, skipDeplC
9797
workspaceState.update(`${file.uniqueId}:mtime`, undefined);
9898
// Create fresh cache entry
9999
checkChangedOnServer(file, true);
100+
101+
// In case another extension has used an 'objectscript://' uri to load a document read-only from the server,
102+
// make it reload with what we just imported to the server.
103+
const serverUri = DocumentContentProvider.getUri(
104+
file.name,
105+
file.workspaceFolder,
106+
undefined,
107+
false,
108+
undefined,
109+
true
110+
);
111+
documentContentProvider.update(serverUri.with({ scheme: "objectscript" }));
100112
})
101113
.catch((error) => {
102114
if (error?.statusCode == 409) {

0 commit comments

Comments
 (0)