Mercurial > vim
diff src/eval.c @ 9688:2ea935bdd1a1 v7.4.2120
commit https://github.com/vim/vim/commit/10ce39a0d52272a3dfff2feb8c631529f29e6740
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jul 29 22:37:06 2016 +0200
patch 7.4.2120
Problem: User defined functions can't be a closure.
Solution: Add the "closure" argument. Allow using :unlet on a bound
variable. (Yasuhiro Matsumoto, Ken Takata)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 29 Jul 2016 22:45:06 +0200 |
parents | 8c2553beff0f |
children | 6226de5f8137 |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -2837,7 +2837,9 @@ do_unlet(char_u *name, int forceit) } } hi = hash_find(ht, varname); - if (!HASHITEM_EMPTY(hi)) + if (HASHITEM_EMPTY(hi)) + hi = find_hi_in_scoped_ht(name, &varname, &ht); + if (hi != NULL && !HASHITEM_EMPTY(hi)) { di = HI2DI(hi); if (var_check_fixed(di->di_flags, name, FALSE)