API: nvim_set_vvar(): set v: variables #9395

closes #9349
This commit is contained in:
jin cong 2018-12-25 01:05:00 +11:00 committed by Justin M. Keyes
parent 0b8c4b995a
commit 475b97e021

View File

@ -687,6 +687,17 @@ Object nvim_get_vvar(String name, Error *err)
return dict_get_value(&vimvardict, name, err); return dict_get_value(&vimvardict, name, err);
} }
/// Sets a v: variable, if it is not readonly
///
/// @param name Variable name
/// @param value Variable value
/// @param[out] err Error details, if any
void nvim_set_vvar(String name, Object value, Error *err)
FUNC_API_SINCE(6)
{
dict_set_var(&vimvardict, name, value, false, false, err);
}
/// Gets an option value string /// Gets an option value string
/// ///
/// @param name Option name /// @param name Option name