0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.4202: Vim9: cannot export function that exists globally

Problem:    Vim9: cannot export function that exists globally.
Solution:   When checking if a function already exists only check for
            script-local functions. (closes #9615)
This commit is contained in:
Bram Moolenaar
2022-01-24 13:54:45 +00:00
parent 8e4af851fd
commit acc4b5648b
7 changed files with 58 additions and 12 deletions

View File

@@ -2050,7 +2050,7 @@ delete_instr(isn_T *isn)
case ISN_NEWFUNC:
{
char_u *lambda = isn->isn_arg.newfunc.nf_lambda;
ufunc_T *ufunc = find_func_even_dead(lambda, TRUE);
ufunc_T *ufunc = find_func_even_dead(lambda, FFED_IS_GLOBAL);
if (ufunc != NULL)
{