1
0
forked from aniani/vim

patch 9.0.0397: :defer not tested with exceptions and ":qa!"

Problem:    :defer not tested with exceptions and ":qa!".
Solution:   Test :defer works when exceptions are thrown and when ":qa!" is
            used.  Invoke the deferred calls on exit.
This commit is contained in:
Bram Moolenaar
2022-09-06 18:31:14 +01:00
parent 2834ebdee4
commit 58779858fb
9 changed files with 123 additions and 19 deletions

View File

@@ -263,8 +263,9 @@ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv)
if (partial->pt_func != NULL
&& partial->pt_func->uf_def_status != UF_NOT_COMPILED)
{
// FIXME: should create a funccal and link it in current_funccal.
if (call_def_function(partial->pt_func, argc, argv,
partial, rettv) == FAIL)
partial, NULL, rettv) == FAIL)
return FAIL;
}
else