mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
refactor(options)!: make OptionSet v:
values use typval
BREAKING CHANGE: This breaks the OptionSet autocommand, as the `v:` values associated with it (`v:option_new`, `v:option_old`, `v:option_oldlocal` and `v:option_oldglobal`) are now the same type as the option, instead of all option values being converted to strings.
This commit is contained in:
@@ -7226,6 +7226,17 @@ void set_vim_var_dict(const VimVarIndex idx, dict_T *const val)
|
||||
tv_dict_set_keys_readonly(val);
|
||||
}
|
||||
|
||||
/// Set v:variable to tv.
|
||||
///
|
||||
/// @param[in] idx Index of variable to set.
|
||||
/// @param[in,out] val Value to set to. Reference count will be incremented.
|
||||
/// Also keys of the dictionary will be made read-only.
|
||||
void set_vim_var_tv(const VimVarIndex idx, typval_T *const tv)
|
||||
{
|
||||
tv_clear(&vimvars[idx].vv_di.di_tv);
|
||||
vimvars[idx].vv_di.di_tv = *tv;
|
||||
}
|
||||
|
||||
/// Set the v:argv list.
|
||||
void set_argv_var(char **argv, int argc)
|
||||
{
|
||||
|
Reference in New Issue
Block a user