diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-05-07 17:55:55 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-05-07 17:55:55 +0200 |
commit | f18332fb9e2e4208a97d800f096b02c6681780e7 (patch) | |
tree | 8cbfcb58bfbe67b2549d76ba721b2db9c33a602b /src/typval.c | |
parent | e08795e1ecf0b85751e9f41021603c39ef026d92 (diff) | |
download | vim-git-f18332fb9e2e4208a97d800f096b02c6681780e7.tar.gz |
patch 8.2.2842: Vim9: skip argument to searchpair() is not compiledv8.2.2842
Problem: Vim9: skip argument to searchpair() is not compiled.
Solution: Add VAR_INSTR.
Diffstat (limited to 'src/typval.c')
-rw-r--r-- | src/typval.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/typval.c b/src/typval.c index f4af61a17..4bde94e19 100644 --- a/src/typval.c +++ b/src/typval.c @@ -91,6 +91,7 @@ free_tv(typval_T *varp) case VAR_VOID: case VAR_BOOL: case VAR_SPECIAL: + case VAR_INSTR: break; } vim_free(varp); @@ -153,6 +154,7 @@ clear_tv(typval_T *varp) case VAR_UNKNOWN: case VAR_ANY: case VAR_VOID: + case VAR_INSTR: break; } varp->v_lock = 0; @@ -236,6 +238,7 @@ tv_get_bool_or_number_chk(typval_T *varp, int *denote, int want_bool) case VAR_UNKNOWN: case VAR_ANY: case VAR_VOID: + case VAR_INSTR: internal_error_no_abort("tv_get_number(UNKNOWN)"); break; } @@ -333,6 +336,7 @@ tv_get_float(typval_T *varp) case VAR_UNKNOWN: case VAR_ANY: case VAR_VOID: + case VAR_INSTR: internal_error_no_abort("tv_get_float(UNKNOWN)"); break; } @@ -514,6 +518,7 @@ tv_get_string_buf_chk_strict(typval_T *varp, char_u *buf, int strict) case VAR_UNKNOWN: case VAR_ANY: case VAR_VOID: + case VAR_INSTR: emsg(_(e_inval_string)); break; } @@ -614,6 +619,10 @@ copy_tv(typval_T *from, typval_T *to) ++to->vval.v_channel->ch_refcount; break; #endif + case VAR_INSTR: + to->vval.v_instr = from->vval.v_instr; + break; + case VAR_STRING: case VAR_FUNC: if (from->vval.v_string == NULL) @@ -1116,6 +1125,8 @@ tv_equal( #ifdef FEAT_JOB_CHANNEL return tv1->vval.v_channel == tv2->vval.v_channel; #endif + case VAR_INSTR: + return tv1->vval.v_instr == tv2->vval.v_instr; case VAR_PARTIAL: return tv1->vval.v_partial == tv2->vval.v_partial; |