1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2021-05-16 15:24:49 +02:00
parent 3ec3217f04
commit ff65288aa8
5 changed files with 23 additions and 4 deletions

View File

@@ -3131,7 +3131,8 @@ compile_string(isn_T *isn, cctx_T *cctx)
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 @@ compile_arguments(char_u **arg, cctx_T *cctx, int *argcount, int is_searchpair)
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;