mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.1071: Vim9: no line break allowed inside a lambda
Problem: Vim9: no line break allowed inside a lambda. Solution: Handle line break inside a lambda in Vim9 script.
This commit is contained in:
@@ -3001,7 +3001,7 @@ to_name_const_end(char_u *arg)
|
||||
}
|
||||
else if (p == arg && *arg == '{')
|
||||
{
|
||||
int ret = get_lambda_tv(&p, &rettv, FALSE);
|
||||
int ret = get_lambda_tv(&p, &rettv, NULL);
|
||||
|
||||
// Can be "{x -> ret}()".
|
||||
// Can be "{'a': 1}->Func()".
|
||||
@@ -3065,7 +3065,7 @@ compile_lambda(char_u **arg, cctx_T *cctx)
|
||||
ufunc_T *ufunc;
|
||||
|
||||
// Get the funcref in "rettv".
|
||||
if (get_lambda_tv(arg, &rettv, TRUE) != OK)
|
||||
if (get_lambda_tv(arg, &rettv, &EVALARG_EVALUATE) != OK)
|
||||
return FAIL;
|
||||
|
||||
ufunc = rettv.vval.v_partial->pt_func;
|
||||
@@ -3095,7 +3095,7 @@ compile_lambda_call(char_u **arg, cctx_T *cctx)
|
||||
int ret = FAIL;
|
||||
|
||||
// Get the funcref in "rettv".
|
||||
if (get_lambda_tv(arg, &rettv, TRUE) == FAIL)
|
||||
if (get_lambda_tv(arg, &rettv, &EVALARG_EVALUATE) == FAIL)
|
||||
return FAIL;
|
||||
|
||||
if (**arg != '(')
|
||||
|
Reference in New Issue
Block a user