forked from aniani/vim
patch 8.2.2223: Vim9: Reloading marks a :def function as deleted
Problem: Vim9: Reloading marks a :def function as deleted. Solution: Clear the function contents but keep the index.
This commit is contained in:
@@ -3628,7 +3628,7 @@ define_function(exarg_T *eap, char_u *name_arg)
|
||||
fp->uf_profiling = FALSE;
|
||||
fp->uf_prof_initialized = FALSE;
|
||||
#endif
|
||||
unlink_def_function(fp);
|
||||
fp->uf_def_status = UF_NOT_COMPILED;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3694,8 +3694,6 @@ define_function(exarg_T *eap, char_u *name_arg)
|
||||
fp = alloc_clear(offsetof(ufunc_T, uf_name) + STRLEN(name) + 1);
|
||||
if (fp == NULL)
|
||||
goto erret;
|
||||
fp->uf_def_status = eap->cmdidx == CMD_def ? UF_TO_BE_COMPILED
|
||||
: UF_NOT_COMPILED;
|
||||
|
||||
if (fudi.fd_dict != NULL)
|
||||
{
|
||||
|
Reference in New Issue
Block a user