diff src/evalvars.c @ 22551:86a115a80262 v8.2.1824

patch 8.2.1824: Vim9: variables at the script level escape their scope Commit: https://github.com/vim/vim/commit/fcdc5d83fbfd7ddce634769ea902e58c87f27f20 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 10 19:07:09 2020 +0200 patch 8.2.1824: Vim9: variables at the script level escape their scope Problem: Vim9: variables at the script level escape their scope. Solution: When leaving a scope remove variables declared in it.
author Bram Moolenaar <Bram@vim.org>
date Sat, 10 Oct 2020 19:15:04 +0200
parents 2df99e237965
children 209c7aa56325
line wrap: on
line diff
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -174,7 +174,6 @@ static char_u *list_arg_vars(exarg_T *ea
 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_v
  * 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);