Mercurial > vim
diff src/vim9compile.c @ 20189:63cc54100ae4 v8.2.0650
patch 8.2.0650: Vim9: script function can be deleted
Commit: https://github.com/vim/vim/commit/4c17ad94ecb0a0fb26d6fface2614bc5172dea18
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Apr 27 22:47:51 2020 +0200
patch 8.2.0650: Vim9: script function can be deleted
Problem: Vim9: script function can be deleted.
Solution: Disallow deleting script function. Delete functions when sourcing
a script again.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 27 Apr 2020 23:00:03 +0200 |
parents | 72b437855299 |
children | 5a397db2c1ed |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -2210,7 +2210,7 @@ compile_load_scriptvar( static int generate_funcref(cctx_T *cctx, char_u *name) { - ufunc_T *ufunc = find_func(name, cctx); + ufunc_T *ufunc = find_func(name, FALSE, cctx); if (ufunc == NULL) return FAIL; @@ -2452,7 +2452,7 @@ compile_call(char_u **arg, size_t varlen } // If we can find the function by name generate the right call. - ufunc = find_func(name, cctx); + ufunc = find_func(name, FALSE, cctx); if (ufunc != NULL) { res = generate_CALL(cctx, ufunc, argcount);