diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-20 06:51:06 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-20 07:25:22 +0800 |
commit | 15ca01b649fb35186f1eb9b4422c36f9d8d2c8b4 (patch) | |
tree | 5c52e5eeb62d73a7a9ec549bb70a5599024ccf76 /src/nvim/eval/funcs.c | |
parent | 6d6e9c5d5140ab591ea07e653d4e055606e157c4 (diff) | |
download | rneovim-15ca01b649fb35186f1eb9b4422c36f9d8d2c8b4.tar.gz rneovim-15ca01b649fb35186f1eb9b4422c36f9d8d2c8b4.tar.bz2 rneovim-15ca01b649fb35186f1eb9b4422c36f9d8d2c8b4.zip |
vim-patch:8.2.4667: expandcmd() fails on an error
Problem: expandcmd() fails on an error.
Solution: On failure return the command unmodified. (yegappan Lakshmanan,
closes vim/vim#10063)
https://github.com/vim/vim/commit/5018a836c030988944a9bbe2fd2e538bf5261a72
Diffstat (limited to 'src/nvim/eval/funcs.c')
-rw-r--r-- | src/nvim/eval/funcs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 456fd9fdf6..1798d43c6c 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -2052,10 +2052,10 @@ static void f_expandcmd(typval_T *argvars, typval_T *rettv, FunPtr fptr) }; eap.argt |= EX_NOSPC; + emsg_off++; expand_filename(&eap, &cmdstr, &errormsg); - if (errormsg != NULL && *errormsg != NUL) { - emsg(errormsg); - } + emsg_off--; + rettv->vval.v_string = cmdstr; } |