summaryrefslogtreecommitdiffstats
path: root/src/evalvars.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-10-10 19:07:09 +0200
committerBram Moolenaar <Bram@vim.org>2020-10-10 19:07:09 +0200
commitfcdc5d83fbfd7ddce634769ea902e58c87f27f20 (patch)
treeeefebdaddad609fcd533c83744099629bd8d6112 /src/evalvars.c
parent28f224b2c1bd2fcdee7b4fe2c64826e1cff08f39 (diff)
patch 8.2.1824: Vim9: variables at the script level escape their scopev8.2.1824
Problem: Vim9: variables at the script level escape their scope. Solution: When leaving a scope remove variables declared in it.
Diffstat (limited to 'src/evalvars.c')
-rw-r--r--src/evalvars.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index f7ee58d531..2455046d93 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -174,7 +174,6 @@ static char_u *list_arg_vars(exarg_T *eap, char_u *arg, int *first);
static char_u *ex_let_one(char_u *arg, typval_T *tv, int copy, int flags, char_u *endchars, char_u *op);
static int do_unlet_var(lval_T *lp, char_u *name_end, exarg_T *eap, int deep, void *cookie);
static int do_lock_var(lval_T *lp, char_u *name_end, exarg_T *eap, int deep, void *cookie);
-static void delete_var(hashtab_T *ht, hashitem_T *hi);
static void list_one_var(dictitem_T *v, char *prefix, int *first);
static void list_one_var_a(char *prefix, char_u *name, int type, char_u *string, int *first);
@@ -2890,7 +2889,7 @@ vars_clear_ext(hashtab_T *ht, int free_val)
* Delete a variable from hashtab "ht" at item "hi".
* Clear the variable value and free the dictitem.
*/
- static void
+ void
delete_var(hashtab_T *ht, hashitem_T *hi)
{
dictitem_T *di = HI2DI(hi);