mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 10:26:31 +00:00
vim-patch:8.2.0200: Vim9 script commands not sufficiently tested
Problem: Vim9 script commands not sufficiently tested.
Solution: Add more tests. Fix storing global variable. Make script
variables work.
b283a8a680
Vim9 is N/A. Skip.
"set_vim_var_tv()" does not throw E1063 on type mismatch.
See https://github.com/neovim/neovim/pull/25394 .
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -6597,16 +6597,6 @@ typval_T *get_vim_var_tv(const VimVarIndex idx)
|
||||
return &vimvars[idx].vv_tv;
|
||||
}
|
||||
|
||||
/// Set v:variable to tv.
|
||||
///
|
||||
/// @param[in] idx Index of variable to set.
|
||||
/// @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);
|
||||
tv_copy(tv, &vimvars[idx].vv_di.di_tv);
|
||||
}
|
||||
|
||||
/// Set the v:argv list.
|
||||
void set_argv_var(char **argv, int argc)
|
||||
{
|
||||
|
@@ -1527,6 +1527,17 @@ dict_T *get_vimvar_dict(void)
|
||||
return &vimvardict;
|
||||
}
|
||||
|
||||
/// Set v:variable to tv.
|
||||
///
|
||||
/// @param[in] idx Index of variable to set.
|
||||
/// @param[in] val Value to set to. Will be copied.
|
||||
void set_vim_var_tv(const VimVarIndex idx, typval_T *const tv)
|
||||
{
|
||||
typval_T *vv_tv = get_vim_var_tv(idx);
|
||||
tv_clear(vv_tv);
|
||||
tv_copy(tv, vv_tv);
|
||||
}
|
||||
|
||||
/// Get number v: variable value.
|
||||
varnumber_T get_vim_var_nr(const VimVarIndex idx) FUNC_ATTR_PURE
|
||||
{
|
||||
|
Reference in New Issue
Block a user