hundredrabbits / Left

Distractionless Writing Tool
http://hundredrabbits.itch.io/left
Other
1.78k stars 144 forks source link

Load files synchronously to prevent mismatched contents #79

Closed JakubValtar closed 6 years ago

JakubValtar commented 6 years ago

When dropping multiple files into Left window, readFile callbacks are not always called in the original order and you might end up with file contents mismatched. If you make edits and save, the original content of the file will be overwritten. This fixes the problem.

neauoire commented 6 years ago

I hope that didn't burn you. Thanks for the fix, I will merge with Release tonight : )

JakubValtar commented 6 years ago

Well, there is a reason for this PR 😅

But no worries, I got the file back. I use Left on my own risk and I do weird stuff with it so I make backups frequently.

neauoire commented 6 years ago

Everyone can enjoy this added security now :)