patch 8.2.1023: Vim9: redefining a function uses a new index every time
Problem: Vim9: redefining a function uses a new index every time.
Solution: When redefining a function clear the contents and re-use the
index.
diff --git a/src/eval.c b/src/eval.c
index b4e2c2f..38afc24 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -253,7 +253,7 @@
return FAIL;
if (partial->pt_func != NULL
- && partial->pt_func->uf_dfunc_idx != UF_NOT_COMPILED)
+ && partial->pt_func->uf_def_status != UF_NOT_COMPILED)
{
if (call_def_function(partial->pt_func, argc, argv,
partial, rettv) == FAIL)