patch 8.1.1491: when skipping over code a function call may cause trouble
Problem: When skipping over code after an exception was thrown expression
evaluation is aborted after a function call. (Ingo Karkat)
Solution: Do not fail if not executing the expression. (closes #4507)
diff --git a/src/eval.c b/src/eval.c
index abb3b40..c86d0a6 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -4592,7 +4592,7 @@
/* Stop the expression evaluation when immediately
* aborting on error, or when an interrupt occurred or
* an exception was thrown but not caught. */
- if (aborting())
+ if (evaluate && aborting())
{
if (ret == OK)
clear_tv(rettv);