Skip to content

Commit

Permalink
Save files on execution with a config setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Plutoberth committed Jul 3, 2020
1 parent f0e64b0 commit f7277e5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion idacode/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions idacode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
"type": "integer",
"default": 7066,
"description": "The port the IDA debug server is listening on."
},
"IDACode.saveOnExecute": {
"type": "boolean",
"default": true,
"description": "Save all open editors when executing."
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions idacode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ function getCurrentDocument(): string {
}

function executeScript() {
if (getConfig<boolean>('saveOnExecute'))
{
vscode.workspace.saveAll().then();
}

const currentDocument = getCurrentDocument();
const name = path.parse(currentDocument).base;
socket.send({
Expand Down

0 comments on commit f7277e5

Please sign in to comment.