mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 23:08:16 +00:00
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)
5018a836c0
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user