1
0
forked from aniani/vim

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

@@ -2004,6 +2004,10 @@ vim_regsub_both(
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);