-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
autocmd: rename: "++nested", "++once" #9728
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
Conversation
31ed668
to
29ddd4a
Compare
Based on feedback from upstream: vim/vim#4100
Problem: If autocmd pattern only contained `++once` handlers, and all of them completed, then there would be an empty group displayed by `:autocmd Foo`. Solution: Delete the pattern if all of its commands were deleted.
|
@ilAYAli angle brackets are onerous. Imagine if shell commands required every option to be wrapped in brackets.
|
Merging this because it fixes 2 bugs. |
@justinmk |
@@ -363,8 +363,8 @@ static void set_bg_deferred(void **argv) | |||
if (starting) { | |||
// Wait until after startup, so OptionSet is triggered. | |||
do_cmdline_cmd((bgvalue[0] == 'l') | |||
? "autocmd VimEnter * once nested set background=light" | |||
: "autocmd VimEnter * once nested set background=dark"); |
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.
Forgot to rename this to -once
last time...
Any confusion about Happy to rename it back to |
As it happens, both a lone |
-once
=>++once
based on feedback from autocmd: introduce "++once" flag vim/vim#4100++once
handlers, and all of them completed, then there would be an empty group displayed by:autocmd Foo
.