Gary Johnson wrote:

> Thanks for adding the DiffUpdated autocommand event.
> 
> I've been trying to use the DiffUpdated and OptionSet autocommand
> events to update some option settings and I think I've found a bug
> in the OptionSet event: v:option_old and v:option_new are not set
> when the option is diff.  I'm using Vim 8.1.401.
> 
> When I execute the following autocommand definition,
> 
>     :autocmd OptionSet diff echo "OptionSet diff" v:option_old v:option_new
> 
> followed by
> 
>     :set diff
>     :set nodiff
> 
> all I see displayed in the status line for each of those is
> 
>     OptionSet diff
> 
> but no values for either v:option_old or v:option_new.
> 
> Repeating the experiment, but replacing "diff" by "number" yields
> the expected results:
> 
>     OptionSet number 0 1
>     OptionSet number 1 0

Well, it works just fine for me.  No idea why it doesn't work for you.

-- 
>From "know your smileys":
 :-)-O  Smiling doctor with stethoscope

 /// 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