Patch 8.2.1378
Problem:    Cannot put space between function name and paren.
Solution:   Allow this for backwards compatibility.
Files:      src/eval.c, src/testdir/test_expr.vim,
            src/testdir/test_vim9_expr.vim


*** ../vim-8.2.1377/src/eval.c  2020-08-05 12:44:37.369298977 +0200
--- src/eval.c  2020-08-06 11:15:51.404279043 +0200
***************
*** 3198,3206 ****
        {
            int     flags = evalarg == NULL ? 0 : evalarg->eval_flags;
  
!           if (**arg == '(')
                // "name(..."  recursive!
                ret = eval_func(arg, evalarg, s, len, rettv, flags, NULL);
            else if (flags & EVAL_CONSTANT)
                ret = FAIL;
            else if (evaluate)
--- 3198,3209 ----
        {
            int     flags = evalarg == NULL ? 0 : evalarg->eval_flags;
  
!           if ((in_vim9script() ? **arg : *skipwhite(*arg)) == '(')
!           {
                // "name(..."  recursive!
+               *arg = skipwhite(*arg);
                ret = eval_func(arg, evalarg, s, len, rettv, flags, NULL);
+           }
            else if (flags & EVAL_CONSTANT)
                ret = FAIL;
            else if (evaluate)
*** ../vim-8.2.1377/src/testdir/test_expr.vim   2020-08-04 15:52:58.281452992 
+0200
--- src/testdir/test_expr.vim   2020-08-06 10:58:23.722335878 +0200
***************
*** 599,604 ****
--- 599,609 ----
    call assert_fails("let v = -{}", 'E728:')
  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
  func Test_float_compare()
    CheckFeature float
*** ../vim-8.2.1377/src/testdir/test_vim9_expr.vim      2020-08-05 
15:43:40.513333228 +0200
--- src/testdir/test_vim9_expr.vim      2020-08-06 11:16:29.572182241 +0200
***************
*** 1686,1691 ****
--- 1686,1695 ----
    assert_equal([0, 1, 2], --3->range())
  
    call CheckDefFailure(["let x = 'yes'->Echo"], 'E107:')
+   call CheckScriptFailure([
+       "vim9script",
+       "let x = substitute ('x', 'x', 'x', 'x')"
+       ], 'E121:')
  enddef
  
  
*** ../vim-8.2.1377/src/version.c       2020-08-05 22:07:22.495376371 +0200
--- src/version.c       2020-08-06 10:55:37.390866475 +0200
***************
*** 756,757 ****
--- 756,759 ----
  {   /* Add new patch number below this line */
+ /**/
+     1378,
  /**/

-- 
Don't drink and drive.  You might hit a bump and spill your beer.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202008060924.0769ODbI3529291%40masaka.moolenaar.net.

Raspunde prin e-mail lui