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)
diff --git a/src/regexp.c b/src/regexp.c
index a9bdd95..98231da 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -2004,6 +2004,10 @@
funcexe.fe_partial = partial;
call_func(s, -1, &rettv, 1, argv, &funcexe);
}
+ else if (expr->v_type == VAR_INSTR)
+ {
+ exe_typval_instr(expr, &rettv);
+ }
if (matchList.sl_list.lv_len > 0)
// fill_submatch_list() was called
clear_submatch_list(&matchList);