Hi All,
I made some changes to a file that was open as part of a Rails project (the whole project was opened) and saved the changes. TextMate showed the file as having no unsaved changes. However, inspecting the file outside of TextMate, I could see that the the changes were not saved. I rebooted my computer and when TextMate reopened, there was the file with my changes showing (but which were not saved although again it showed as having no unsaved changes). I had to close the file, reopen it, and re-apply the changes before saving again in order to actually save the changes (I probably could’ve copied the entire file onto the clipboard before I closed and reopened and made the changes that way, but I didn’t expect the changes to be gone).
Before opening an issue on GitHub, I wanted to see if this was a known issue with 2.0-beta.12. I’m running on OS X 10.11.6. Let me know if you need any other configuration information or have any thoughts that might help me to reliably reproduce this problem (I’ve noticed a couple times where files that were left open while changing GIT branches did not recognize that the underlying files had changed as TextMate 1 did. Might this be an issue with capturing directory change events?
Thanks in advance for helping!
Jack
On 20 Aug 2016, at 8:57, Jack Royal-Gordon wrote:
I made some changes to a file that was open as part of a Rails project (the whole project was opened) and saved the changes. TextMate showed the file as having no unsaved changes. However, inspecting the file outside of TextMate, I could see that the the changes were not saved.
And even pressing ⌘S did not change that? ⌘S will always save, even if it shows “no changes”.
Also, when you have a file open, you can use Bundles → Diff → Document With Saved Copy. This will run a diff util on the buffer and the file on disk, that should be able to confirm if somehow TM’s buffer is different with the file on disk after ⌘S.
I rebooted my computer and when TextMate reopened, there was the file with my changes showing (but which were not saved although again it showed as having no unsaved changes). I had to close the file, reopen it, and re-apply the changes before saving again in order to actually save the changes
So you rebooted, re-opened the file, and while TM found your (unsaved) changes, it would still not save on ⌘S. But closing file (again) and re-opening now did show the file on disk, and you could save?
[…] I wanted to see if this was a known issue with 2.0-beta.12.
Nothing I have heard of before, but from the description above, it really sounds like TextMate was operating on a different file than what you was inspect on disk, that would explain all of the behavior perfectly, including rebooting and showing the updated file “with no changes”, yet after closing it and opening the (right) file, you now lost the changes, and had to re-do them.
So what should probably be looked into is, how did it get to operate on this other file, and where on disk was it?
Did anything work on the files on disk (TextMate will track renames, hence if you open /path/to/file and then move it to /path/to/other/place, it will update its reference).
Should it ever happen again, you can right-click the proxy icon to see where the file is on dis, or use File Browser → Reveal Document.