SecretSheppy / haskedit

The simple Haskell editor for Windows
MIT License
0 stars 0 forks source link

When file formatting, the save file process is called twice. #4

Open SecretSheppy opened 1 week ago

SecretSheppy commented 1 week ago

this happens because haskedit saves the file and then formats it after (in order to ensure the file is always saved) and then saves the file again.

this process could be changed to attempt to format the file before saving it, and then catching the failed error to allow the file to then be saved without formatting.

on top of this, the file saving is still synchronous, so this double call to save is blocking the main thread for double the amount of time. this should also be changed, however this is probably better as a separate issue.