arnoudkooi / sn-scriptsync

Use sn-scriptsync in combination with SN Utils to be able to code in VS Code, including all benefits of a full fledged code editor
https://marketplace.visualstudio.com/items?itemName=arnoudkooicom.sn-scriptsync
Other
43 stars 28 forks source link

Files now remain dirty on error during saving #13

Closed Blenderpics closed 5 years ago

Blenderpics commented 5 years ago

If for whatever reason an error during the saving of a file occurs, the file now still remains "dirty".
You can then easily try to save it a second time by just pressing ctrl+s.
Previousely you had to insert and remove a space or something, in order to "set" the dirty status again, so that you are able to try to save it once again.
And that's basicly what this patch does. If an error occurs during the saving of a file, a space gets added to the end of the file, which then imediately gets removed again.
This is more of a workaround than a nice solution to the problem.
I could not however find any nicer way to achieve this. There is unfortunately no way i know to set the dirty status of a file.

arnoudkooi commented 5 years ago

Smart workaround, ill update it to the marketplace