mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.2739: Vim9: a lambda accepts too many arguments at the script level
Problem: Vim9: a lambda accepts too many arguments at the script level. Solution: Do not set uf_varargs in Vim9 script.
This commit is contained in:
@@ -1263,8 +1263,9 @@ get_lambda_tv(
|
||||
#endif
|
||||
if (sandbox)
|
||||
flags |= FC_SANDBOX;
|
||||
// can be called with more args than uf_args.ga_len
|
||||
fp->uf_varargs = TRUE;
|
||||
// In legacy script a lambda can be called with more args than
|
||||
// uf_args.ga_len.
|
||||
fp->uf_varargs = !in_vim9script();
|
||||
fp->uf_flags = flags;
|
||||
fp->uf_calls = 0;
|
||||
fp->uf_script_ctx = current_sctx;
|
||||
|
Reference in New Issue
Block a user