I would like Sublime Text to ask about unsaved changes when the user closes a window and there are other windows open. The application preserves unsaved changes when the last window is closed. Even though I know the app does not preserve unsaved changes when a non-last window is closed, I have lost unsaved changed multiple times because I forgot that there was another window open.
I’ve discovered a way to make this happen, but I think the behavior should be part of the base code, not something users need to set up themselves. My method is:
-
Install the Hooks package.
-
Add the following to the sublime-settings file:
"on_pre_close_window": [ { "command": "saveAll", "scope": "window" } ]
I think this would be an easy change to implement.
Thanks for considering my request.