c9 / core

Cloud9 Core - Part of the Cloud9 SDK for Plugin Development https://c9.github.io/core/ https://c9.io
Other
2.56k stars 921 forks source link

Auto reload of rapid file changes outside of the editor sometimes loads wrong version. #515

Open georgir opened 6 years ago

georgir commented 6 years ago

There is already a feature to detect when a file is changed by another program and reload it - after confirmation if there were unsaved edits, or automatically and silently if there weren't.

But it is not working right when multiple consecutive changes happen in a very short interval. For example, the rapid changes from git stash;git pull; git stash pop would sometimes cause the version after the stash to be loaded instead of the final version. This can cause loss of important edits if not noticed.

I guess adding some delay to the reload so that file changes are sure to have settled down can solve this.