mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
vim-patch:8.2.1378: cannot put space between function name and paren
Problem: Cannot put space between function name and paren.
Solution: Allow this for backwards compatibility.
bbd3e3c357
This fixes a regression from patch 8.2.1365, which isn't ported yet.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -3149,8 +3149,9 @@ static int eval7(char **arg, typval_T *rettv, evalarg_T *const evalarg, bool wan
|
|||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
} else {
|
} else {
|
||||||
const int flags = evalarg == NULL ? 0 : evalarg->eval_flags;
|
const int flags = evalarg == NULL ? 0 : evalarg->eval_flags;
|
||||||
if (**arg == '(') {
|
if (*skipwhite(*arg) == '(') {
|
||||||
// "name(..." recursive!
|
// "name(..." recursive!
|
||||||
|
*arg = skipwhite(*arg);
|
||||||
ret = eval_func(arg, evalarg, s, len, rettv, flags, NULL);
|
ret = eval_func(arg, evalarg, s, len, rettv, flags, NULL);
|
||||||
} else if (evaluate) {
|
} else if (evaluate) {
|
||||||
// get value of variable
|
// get value of variable
|
||||||
|
@@ -717,6 +717,11 @@ func Test_expr_eval_error()
|
|||||||
call assert_fails("let v = -{}", 'E728:')
|
call assert_fails("let v = -{}", 'E728:')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_white_in_function_call()
|
||||||
|
let text = substitute ( 'some text' , 't' , 'T' , 'g' )
|
||||||
|
call assert_equal('some TexT', text)
|
||||||
|
endfunc
|
||||||
|
|
||||||
" Test for float value comparison
|
" Test for float value comparison
|
||||||
func Test_float_compare()
|
func Test_float_compare()
|
||||||
CheckFeature float
|
CheckFeature float
|
||||||
|
Reference in New Issue
Block a user