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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user