0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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.
This commit is contained in:
Bram Moolenaar
2020-06-20 18:19:09 +02:00
parent 845e0ee594
commit 0cb5bcf583
8 changed files with 57 additions and 37 deletions

View File

@@ -253,7 +253,7 @@ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv)
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)