Skip to content

Commit ecb13ef

Browse files
authored
Fix objectscript.autoAdjustName behavior with Save As... (#1562)
1 parent 5f3c831 commit ecb13ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/extension.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,10 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
12621262
// No workspace folders are open
12631263
return;
12641264
}
1265+
// Need to wait in case file was created using "Save As..."
1266+
// because in that case the file gets created without
1267+
// content, and then the content is written in after that
1268+
await new Promise((resolve) => setTimeout(resolve, 100));
12651269
const sourceContent = await vscode.workspace.fs.readFile(uri);
12661270
if (
12671271
sourceContent.length &&

0 commit comments

Comments
 (0)