patch 8.2.0536: Vim9: some compilation code not tested
Problem: Vim9: some compilation code not tested.
Solution: Add more test cases.
diff --git a/src/evalvars.c b/src/evalvars.c
index 6b9c270..8af80ec 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -1915,15 +1915,17 @@
/*
* 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);
}