mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
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.
This commit is contained in:
@@ -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, cctx_T *cctx, int argcount_init)
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
Reference in New Issue
Block a user