patch 8.2.2857: Vim9: exception in ISN_INSTR caught at wrong level
Problem: Vim9: exception in ISN_INSTR caught at wrong level.
Solution: Set the starting trylevel in exec_instructions(). (closes #8214)
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 39c36df..9aa93de 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -3131,7 +3131,8 @@
s = skipwhite(s);
trailing_error = *s != NUL;
- if (expr_res == FAIL || trailing_error)
+ if (expr_res == FAIL || trailing_error
+ || ga_grow(&cctx->ctx_instr, 1) == FAIL)
{
if (trailing_error)
semsg(_(e_trailing_arg), s);
@@ -3185,7 +3186,7 @@
return FAIL;
++*argcount;
- if (is_searchpair && *argcount == 5
+ if (is_searchpair && *argcount >= 5
&& cctx->ctx_instr.ga_len == instr_count + 1)
{
isn_T *isn = ((isn_T *)cctx->ctx_instr.ga_data) + instr_count;