mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:9.1.0182: Can define function with invalid name inside 'formatexpr' (#27883)
Problem: Can define function with invalid name inside 'formatexpr'.
Solution: Use goto instead of checking for did_emsg later.
(zeertzjq)
closes: vim/vim#14209
6a04bf5ee5
This commit is contained in:
@@ -2309,6 +2309,7 @@ void ex_function(exarg_T *eap)
|
||||
: eval_isnamec(name_base[i])); i++) {}
|
||||
if (name_base[i] != NUL) {
|
||||
emsg_funcname(e_invarg2, arg);
|
||||
goto ret_free;
|
||||
}
|
||||
}
|
||||
// Disallow using the g: dict.
|
||||
|
Reference in New Issue
Block a user