diff options
author | LemonBoy <thatlemon@gmail.com> | 2022-05-05 13:53:03 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-05 13:53:03 +0100 |
commit | f3b4895f2727e3849ca10030b251cccd9d1383f3 (patch) | |
tree | 97af9696abeba219135a0baf1947058cd4d5d995 /src/evalfunc.c | |
parent | e442d59f6d6732c226d636067c07b7342838b36b (diff) |
patch 8.2.4870: Vim9: expression in :substitute is not compiledv8.2.4870
Problem: Vim9: expression in :substitute is not compiled.
Solution: Use an INSTR instruction if possible. (closes #10334)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index f0650260d3..55041b945f 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -9966,7 +9966,9 @@ f_substitute(typval_T *argvars, typval_T *rettv) pat = tv_get_string_buf_chk(&argvars[1], patbuf); flg = tv_get_string_buf_chk(&argvars[3], flagsbuf); - if (argvars[2].v_type == VAR_FUNC || argvars[2].v_type == VAR_PARTIAL) + if (argvars[2].v_type == VAR_FUNC + || argvars[2].v_type == VAR_PARTIAL + || argvars[2].v_type == VAR_INSTR) expr = &argvars[2]; else sub = tv_get_string_buf_chk(&argvars[2], subbuf); |