mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user