patch 8.1.1542: an OptionSet autocommand does not get enough info

Problem:    An OptionSet autocommand does not get enough info.
Solution:   Add v:option_command, v:option_oldlocal and v:option_oldglobal.
            (Latrice Wilgus, closes #4118)
This commit is contained in:
Bram Moolenaar
2019-06-15 17:12:48 +02:00
parent bffc50494d
commit d7c9687947
9 changed files with 750 additions and 85 deletions

View File

@ -336,7 +336,10 @@ New Vim variables: ~
|v:null| an empty String, used for JSON
|v:option_new| new value of the option, used by |OptionSet|
|v:option_old| old value of the option, used by |OptionSet|
|v:option_oldlocal| old local value of the option, used by |OptionSet|
|v:option_oldglobal| old global value of the option, used by |OptionSet|
|v:option_type| scope of the set command, used by |OptionSet|
|v:option_command| command used to set the option, used by |OptionSet|
|v:progpath| the command with which Vim was invoked
|v:t_bool| value of Boolean type
|v:t_channel| value of Channel type