diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-06-05 21:36:19 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-06-05 21:36:19 +0200 |
commit | 2752360646545a9ae4853d2d5ca91cdb07c14eea (patch) | |
tree | 6143ed047e5f92e2c278fd8594bf1de98a1ea72c /src/vim9execute.c | |
parent | 59b262362f26b3aaea1eeb0078adc33eed59863e (diff) | |
download | vim-git-2752360646545a9ae4853d2d5ca91cdb07c14eea.tar.gz |
patch 8.2.2946: Vim9: substitute expression cannot be a Listv8.2.2946
Problem: Vim9: substitute expression cannot be a List in a :def function.
Solution: Use typval2string(). (closes #8330)
Diffstat (limited to 'src/vim9execute.c')
-rw-r--r-- | src/vim9execute.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vim9execute.c b/src/vim9execute.c index a13b0ab98..e870a279c 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -4130,7 +4130,7 @@ exe_substitute_instr(void) { typval_T *tv = STACK_TV_BOT(-1); - res = vim_strsave(tv_get_string(tv)); + res = typval2string(tv, TRUE); --ectx->ec_stack.ga_len; clear_tv(tv); } |