Files that are renamed / moved while Text Editor is running are misdetected as "changed" on disk
To reproduce (with version 45 and earlier):
- Open
foo.txt
with Text Editor -
While Text Editor is still running,
with Nautilus (or something else, it could be a network process/sync), rename it to `foo (needs rework).txt"
Text Editor will then show this infobar:
...however it is not actually aware of the new name/location of the file (as hinted by the tab label and tooltip), and clicking the "Discard Changes and Reload" button will just reload the same version that Text Editor had in memory, not the newly named file… which may lead the user to think there were no changes in practice, or saving to the wrong place (or overwriting something by mistake), etc.
So basically, the "and reload" part of the infobar's button currently doesn't really do what it's intended to do, in this specific case. Perhaps a solution could be to prompt the user for the new name/location (if it can't be autodetected), or, if that's too complex, just warn the user more specifically about this in the infobar's label and not offer the reload button? i.e. treat vanished files as such