Mercurial > vim
diff src/eval.c @ 24606:a4fda40e0bb9 v8.2.2842
patch 8.2.2842: Vim9: skip argument to searchpair() is not compiled
Commit: https://github.com/vim/vim/commit/f18332fb9e2e4208a97d800f096b02c6681780e7
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 7 17:55:55 2021 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 07 May 2021 18:00:04 +0200 |
parents | cb0d344bd381 |
children | 07b3d21a8b4b |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -309,6 +309,10 @@ eval_expr_typval(typval_T *expr, typval_ 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 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 eva 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: