comparison src/evalfunc.c @ 28692:bfd8e25fa207 v8.2.4870

patch 8.2.4870: Vim9: expression in :substitute is not compiled Commit: https://github.com/vim/vim/commit/f3b4895f2727e3849ca10030b251cccd9d1383f3 Author: LemonBoy <thatlemon@gmail.com> Date: Thu May 5 13:53:03 2022 +0100 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 https://github.com/vim/vim/issues/10334)
author Bram Moolenaar <Bram@vim.org>
date Thu, 05 May 2022 15:00:04 +0200
parents 38f7a132bba3
children add09d468c0d
comparison
equal deleted inserted replaced
28691:ca54846af861 28692:bfd8e25fa207
9964 9964
9965 str = tv_get_string_chk(&argvars[0]); 9965 str = tv_get_string_chk(&argvars[0]);
9966 pat = tv_get_string_buf_chk(&argvars[1], patbuf); 9966 pat = tv_get_string_buf_chk(&argvars[1], patbuf);
9967 flg = tv_get_string_buf_chk(&argvars[3], flagsbuf); 9967 flg = tv_get_string_buf_chk(&argvars[3], flagsbuf);
9968 9968
9969 if (argvars[2].v_type == VAR_FUNC || argvars[2].v_type == VAR_PARTIAL) 9969 if (argvars[2].v_type == VAR_FUNC
9970 || argvars[2].v_type == VAR_PARTIAL
9971 || argvars[2].v_type == VAR_INSTR)
9970 expr = &argvars[2]; 9972 expr = &argvars[2];
9971 else 9973 else
9972 sub = tv_get_string_buf_chk(&argvars[2], subbuf); 9974 sub = tv_get_string_buf_chk(&argvars[2], subbuf);
9973 9975
9974 rettv->v_type = VAR_STRING; 9976 rettv->v_type = VAR_STRING;