Hi!
I’m trying to save the session (open tabs etc.) when exiting Sublime while a project is open, and having it restored when I load that project the next time. I don’t want to use hot_exit, because that would automatically load the project on the next start of Sublime. I.e. if Sublime is closed and I simply open a text file, I want Sublime to start with only that file open, and not load an unrelated project and other files.
Closing a project and then exiting Sublime works fine, as closing the project saves the session and it is properly restored when I restart Sublime and open that project. But just exiting Sublime while the project is still open seems to delete the buffer from the project’s .sublime-workspace file, because I set hot_exit to false.
Using the project manager plugin, Ctrl+Shift+W properly closes the project and then exits Sublime, and that’s the behaviour I’d like to see as default when exiting Sublime. I tried to do it myself, but it seems there is no event listener for when the application closes, so it’s not possible.
Maybe I’m missing something, or there is a workaround? If not, this is probably a feature request - like, maybe add a project_hot_exit setting that can be enabled even if the normal hot_exit is false.
Thanks!