-
Notifications
You must be signed in to change notification settings - Fork 36
Trouble getting a save&close macro to work #55
Copy link
Copy link
Closed
Description
I wrote the following where my intent is to bind a key to save a document then close it:
"macros": {
"saveAndCloseActiveEditor": [
"workbench.action.files.save",
"workbench.action.closeActiveEditor"
]
}
However, it doesn't work as I'd hoped as I still get prompted to save the document:
[Window Title]
Visual Studio Code - Insiders
[Main Instruction]
Do you want to save the changes you made to settings.json?
[Content]
Your changes will be lost if you don't save them.
[Save] [Don't Save] [Cancel]
Strangely, it's as though the closeActiveEditor didn't wait for save to complete. If I cancel that dialog, the document is actually saved from the prior macro run, and if I run it again, it will therefore be able to close without the prompt.
Any idea what's going on here and how I might get around it? Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels