mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
vim-patch:8.2.4055: Vim9: line break in expression causes v:errmsg to be fillec (#23090)
Problem: Vim9: line break in expression causes v:errmsg to be filled.
(Yegappan Lakshmanan)
Solution: Do not give an error when skipping over an expression.
5e6b9882fe
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
002b80cb5d
commit
ae9654dd73
@ -474,6 +474,7 @@ int get_func_tv(const char *name, int len, typval_T *rettv, char **arg, evalarg_
|
|||||||
int ret = OK;
|
int ret = OK;
|
||||||
typval_T argvars[MAX_FUNC_ARGS + 1]; // vars for arguments
|
typval_T argvars[MAX_FUNC_ARGS + 1]; // vars for arguments
|
||||||
int argcount = 0; // number of arguments found
|
int argcount = 0; // number of arguments found
|
||||||
|
const bool evaluate = evalarg == NULL ? false : (evalarg->eval_flags & EVAL_EVALUATE);
|
||||||
|
|
||||||
// Get the arguments.
|
// Get the arguments.
|
||||||
argp = *arg;
|
argp = *arg;
|
||||||
@ -515,7 +516,7 @@ int get_func_tv(const char *name, int len, typval_T *rettv, char **arg, evalarg_
|
|||||||
ret = call_func(name, len, rettv, argcount, argvars, funcexe);
|
ret = call_func(name, len, rettv, argcount, argvars, funcexe);
|
||||||
|
|
||||||
funcargs.ga_len -= i;
|
funcargs.ga_len -= i;
|
||||||
} else if (!aborting()) {
|
} else if (!aborting() && evaluate) {
|
||||||
if (argcount == MAX_FUNC_ARGS) {
|
if (argcount == MAX_FUNC_ARGS) {
|
||||||
emsg_funcname(N_("E740: Too many arguments for function %s"), name);
|
emsg_funcname(N_("E740: Too many arguments for function %s"), name);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user