0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4870: Vim9: expression in :substitute is not compiled

Problem:    Vim9: expression in :substitute is not compiled.
Solution:   Use an INSTR instruction if possible. (closes #10334)
This commit is contained in:
LemonBoy
2022-05-05 13:53:03 +01:00
committed by Bram Moolenaar
parent e442d59f6d
commit f3b4895f27
7 changed files with 82 additions and 14 deletions

View File

@@ -5010,6 +5010,10 @@ exe_typval_instr(typval_T *tv, typval_T *rettv)
int save_iidx = ectx->ec_iidx;
int res;
// Initialize rettv so that it is safe for caller to invoke clear_tv(rettv)
// even when the compilation fails.
rettv->v_type = VAR_UNKNOWN;
ectx->ec_instr = tv->vval.v_instr->instr_instr;
res = exec_instructions(ectx);
if (res == OK)