Skip to content

Commit dfe6784

Browse files
committed
fixed async issue
1 parent f7277e5 commit dfe6784

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

idacode/src/extension.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ function getCurrentDocument(): string {
1515
return vscode.window.activeTextEditor?.document.uri.fsPath as string;
1616
}
1717

18-
function executeScript() {
19-
if (getConfig<boolean>('saveOnExecute'))
20-
{
21-
vscode.workspace.saveAll().then();
22-
}
23-
18+
function executeScriptInIDA() {
2419
const currentDocument = getCurrentDocument();
2520
const name = path.parse(currentDocument).base;
2621
socket.send({
@@ -30,6 +25,14 @@ function executeScript() {
3025
vscode.window.showInformationMessage(`Sent ${name} to IDA`);
3126
}
3227

28+
function executeScript() {
29+
if (getConfig<boolean>('saveOnExecute')) {
30+
vscode.workspace.saveAll().then(executeScriptInIDA);
31+
} else {
32+
executeScriptInIDA();
33+
}
34+
}
35+
3336
function connectToIDA() {
3437
return new Promise((resolve, reject) => {
3538
const host = getConfig<string>('host');

0 commit comments

Comments
 (0)