0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0536: Vim9: some compilation code not tested

Problem:    Vim9: some compilation code not tested.
Solution:   Add more test cases.
This commit is contained in:
Bram Moolenaar
2020-04-09 19:34:43 +02:00
parent 4d23c52824
commit 5da356e073
5 changed files with 38 additions and 13 deletions

View File

@@ -1915,15 +1915,17 @@ get_vimvar_dict(void)
/*
* Returns the index of a v:variable. Negative if not found.
* Returns DI_ flags in "di_flags".
*/
int
find_vim_var(char_u *name)
find_vim_var(char_u *name, int *di_flags)
{
dictitem_T *di = find_var_in_ht(&vimvarht, 0, name, TRUE);
struct vimvar *vv;
dictitem_T *di = find_var_in_ht(&vimvarht, 0, name, TRUE);
struct vimvar *vv;
if (di == NULL)
return -1;
*di_flags = di->di_flags;
vv = (struct vimvar *)((char *)di - offsetof(vimvar_T, vv_di));
return (int)(vv - vimvars);
}