Christian wrote:

> On Fr, 21 Sep 2018, Bram Moolenaar wrote:
> 
> > Patch 8.1.0414
> > Problem:    v:option_old and v:option_new are cleared when using :set in
> >             OptionSet autocmd. (Gary Johnson)
> > Solution:   Don't trigger OptionSet recursively.
> > Files:          src/option.c
> 
> I am wondering why this is necessary. I thought by default, unless one 
> uses the nested flag, this shouldn't happen?

What happens is that the event is triggered again, but won't execute any
autocommands because of the nesting. However, the v: variables have
alredy been set, and will be cleared.

Another solution would be to check for the autocommand nesting, but
that's a bit more complicated.

-- 
>From "know your smileys":
 8-O    "Omigod!!" (done "rm -rf *" ?)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui