mirror of
https://github.com/neovim/neovim.git
synced 2025-09-17 00:38:17 +00:00
refactor(options)!: unify set_option
and set_string_option
While the interfaces for setting number and boolean options are now unified by #25394, there is still a separate `set_string_option` function that is used for setting a string option. This PR removes that function and merges it with set_option. BREAKING CHANGE: `v:option_old` is now the old global value for all global-local options, instead of just string global-local options. Local value for a global-local number/boolean option is now unset when the option is set (e.g. using `:set` or `nvim_set_option_value`) without a scope, which means they now behave the same way as string options. Ref: #25672
This commit is contained in:
@@ -7229,12 +7229,11 @@ void set_vim_var_dict(const VimVarIndex idx, dict_T *const 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.
|
||||
/// @param[in] val Value to set to. Will be copied.
|
||||
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;
|
||||
tv_copy(tv, &vimvars[idx].vv_di.di_tv);
|
||||
}
|
||||
|
||||
/// Set the v:argv list.
|
||||
|
Reference in New Issue
Block a user