Closed mitchr closed 9 years ago
Interesting. I will check the behaviour today and merge accordingly.
So it works as you have described. But I have a worry on shutting down the server on close_window
. If the user has multiple windows open, closing one would shut the server, even if it is still needed. I think it would be better to keep on exit
only.
Also, I think that providing an option to not close the server automatically is needed as I remember that on Arch, DCD is provided as a system wide daemon. In that case, DKit should not close the server.
What do you think?
I'm still not sure why people think that setting up DCD system-wide is a good idea... It was never designed to support more than one user at a time.
I agree about close_window
. I don't know much about Linux, so I can't really interject about system vs. user wide daemons, but I can't see a reason for leaving the daemon running while it's not in use.
The problem with sublime is that it is impossible to know if the editor has exited without shelling out to an external watch program. The API has some misleading function names that might be misconstrued as promising, but in practice they turn out to be useless.
By digging around in the sublime documentation for window commands, I was able to find "exit", and "close_window". The former is executed by File->Exit, and the latter by File->Close Window (or ctrl+shift+w). As of yet, I have not seen anything that gets called by a regular close (i.e. clicking the big red "X"), but this is a promising temporary solution for those who hate having memory taken up by the server.
Also, I haven't done extensive testing, but "exit", and "close_window" seem to be the only commands that are executed at the complete shutdown of the application. "close_file" might be worth checking out, but the documentation for it is nonexistent
Perhaps resolves #1?