Repository navigation
Handle deleted files correctly - #1271
Conversation
There was a problem hiding this comment.
What do you think about destroyUnmodifiedNonExistentBuffers?
There was a problem hiding this comment.
Was this emitModifiedStatusChanged line moved somewhere else? Just wondering if we still needed it.
There was a problem hiding this comment.
Because it now maintains the modified status of the file emitModifiedStatusChanged isn't needed.
|
I added some 🆕 behavior. If an unmodified buffer is deleted, Atom will remove all editors for that buffer. |
There was a problem hiding this comment.
I think you can kill the its pane item is removed from this since it is covered in the it, right? 👇
|
I notice these specs pop up a lot of dialogs when I run them for some reason. |
Conflicts: src/pane.coffee
This reverts commit e0ad22d.
There was a problem hiding this comment.
I'm worried items are going to end up in the state twice here... maybe you should create the state with an empty array and then add them all?
Handle deleted files correctly
Previously, if a file was open in Atom but deleted from the command line (or git, etc...) Atom would keep that buffer open and mark it as modified. This was annoying because when closing Atom it would prompt to be saved. This PR makes Atom treat deleted files as unmodified (unless the file was modified prior to deletion.)
One caveat still exists. The edit session for the deleted file will still be serialized. So a file that doesn't exist on disk will persist when you restart Atom until you explicitly close it. I'd like to wait and fix this problem after we decide on the future of panes.
Created to solve #693