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

patch 8.2.2842: Vim9: skip argument to searchpair() is not compiled

Problem:    Vim9: skip argument to searchpair() is not compiled.
Solution:   Add VAR_INSTR.
This commit is contained in:
Bram Moolenaar
2021-05-07 17:55:55 +02:00
parent e08795e1ec
commit f18332fb9e
18 changed files with 235 additions and 17 deletions

View File

@@ -309,6 +309,10 @@ eval_expr_typval(typval_T *expr, typval_T *argv, int argc, typval_T *rettv)
return FAIL;
}
}
else if (expr->v_type == VAR_INSTR)
{
return exe_typval_instr(expr, rettv);
}
else
{
s = tv_get_string_buf_chk(expr, buf);
@@ -1510,6 +1514,7 @@ tv_op(typval_T *tv1, typval_T *tv2, char_u *op)
case VAR_SPECIAL:
case VAR_JOB:
case VAR_CHANNEL:
case VAR_INSTR:
break;
case VAR_BLOB:
@@ -4084,6 +4089,7 @@ check_can_index(typval_T *rettv, int evaluate, int verbose)
case VAR_SPECIAL:
case VAR_JOB:
case VAR_CHANNEL:
case VAR_INSTR:
if (verbose)
emsg(_(e_cannot_index_special_variable));
return FAIL;
@@ -4177,6 +4183,7 @@ eval_index_inner(
case VAR_SPECIAL:
case VAR_JOB:
case VAR_CHANNEL:
case VAR_INSTR:
break; // not evaluating, skipping over subscript
case VAR_NUMBER:
@@ -5067,6 +5074,11 @@ echo_string_core(
}
break;
case VAR_INSTR:
*tofree = NULL;
r = (char_u *)"instructions";
break;
case VAR_FLOAT:
#ifdef FEAT_FLOAT
*tofree = NULL;
@@ -5987,6 +5999,7 @@ item_copy(
case VAR_SPECIAL:
case VAR_JOB:
case VAR_CHANNEL:
case VAR_INSTR:
copy_tv(from, to);
break;
case VAR_LIST: