+5

"unsaved changes" status set when file wasn't changed

Jeff Petkau 6 years ago 0

ST sets the "unsaved changes" if the file is removed from disk, even if not modified in ST. This leads to the following sequence of events:

1. open a file from removable media in ST

2. temporarily unmount the media

3. remount the media. ST now thinks it has changes to the file.


(This can also happen when switching to git/hg branches where those files are missing, or with network-mounted files that temporarily disappear when credentials expire.)


At this point ST will refuse to load actual external changes to files (e.g. when switching git branches) because it thinks it has modifications. You have to manually close every file, with a warning message about discarding alleged "changes" for each one.