New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add vintageous_exit_app_when_quiting_last_window
#819
Add vintageous_exit_app_when_quiting_last_window
#819
Conversation
The |
It’s okay if you don’t want to merge, but that setting left sublime open even when all views/windows were closed |
It sounds like a bug because it should already work as you expect. Can you provide some details like OS and version being used. Also do you have |
I can't reproduce this issue. Perhaps my configuration is different than yours. Some debug info might help diagnose the issue. https://github.com/NeoVintageous/NeoVintageous/blob/master/.github/CONTRIBUTING.md |
I no longer use sublime or NeoVintageous |
Hello! I'm back to using Sublime & NeoVintageous. Here's the configuration I use: {
"ignored_packages":
[
"Six",
"Vintage",
"Vintageous",
],
"color_scheme": "auto",
"font_size": 16,
"font_face": "SF Mono",
"vintageous_clear_auto_indent_on_esc": false,
"vintageous_use_sys_clipboard": true,
"vintageous_exit_when_quiting_last_window": true,
"vintageous_reset_mode_when_switching_tabs": false,
"highlight_line": true,
"neovintageous_build_version": 12700,
"hot_exit": false,
"remember_open_files": false,
} (Regardless of what I'm using macOS 13.1 Beta (22C5050e) |
…dow is closed, quit Sublime Text completely
f31e169
to
5169d7d
Compare
|
||
_close_view(window, **kwargs) | ||
|
||
if len(sublime.windows()) == 1 and exit_app_when_quitting_last_window: | ||
sublime.run_command('exit') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you try changing sublime.run_command('exit')
to window.run_command('close')
and see if that still works for you. If yes, then it seems the call to _close_view()
above is not closing your view. Because below this there is a check len(window.views()) == 0
so it expects there to be no views open at that point. It will only call window.run_command('close')
if 0 views are open.
I can't reproduce it. But haven't been able to test on a mac yet. I left a comment here: https://github.com/NeoVintageous/NeoVintageous/pull/819/files#r1033433715 about something to try to debug the issue. |
I should note that the Origami plugin is required for some windowing behaviours to work properly e.g. it's required for closing empty panes when closing views and window splitting (e.g. |
fyi there was a typo in documentation for the setting:
Should only have one "t".
I would bet this was the issue. You probably copy and pasted the setting and it's very hard to see the typo. |
Doh. The correct spelling is with two t's. So the documentation was right and the typo was in the code. I'll have to fix the spelling and deprecate the misspelled setting. I'll do it with backwards compatibility, so both work. And make sure it's documented correctly. Sorry about this. |
Also, ZZ and :xit are not respecting the setting. In the next version ZZ and :xit will be the same as :wq. In the meantime you can map it:
|
Rename setting to fix typo: vintageous_exit_when_quiting_last_window to vintageous_exit_when_quitting_last_window This is backwards compatible meaning both settings now currently work, but all documentation now references the correct setting. Re NeoVintageous#953 Fix NeoVintageous#819
When the last window is closed, quit Sublime Text completely