]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0047: Vim9: Comment parsing error with lambda v9.2.0047
authorHirohito Higashi <h.east.727@gmail.com>
Tue, 24 Feb 2026 20:56:06 +0000 (20:56 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 24 Feb 2026 20:56:06 +0000 (20:56 +0000)
Problem:  Vim9: Comment parsing error with lambda (Mao-Yining)
Solution: Drop the skipwhite() (Hirohito Higashi)

fixes:  #19484
closes: #19487

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_vim9_func.vim
src/version.c
src/vim9expr.c

index 7cdf276e033e2b3bff6c1e1c517ae7e97fb3fb19..343c2f777ee504ac5b3e5ff2939e197f26efeefc 100644 (file)
@@ -1922,6 +1922,18 @@ def MyDefVarargs(one: string, two = 'foo', ...rest: list<string>): string
   return res
 enddef
 
+def Test_call_def_comments()
+  var lines =<< trim END
+      def Func(n: number)
+        echo n
+      enddef
+      Func( # comment
+        1
+        )
+  END
+  v9.CheckSourceDefSuccess(lines)
+enddef
+
 def Test_call_def_varargs()
   assert_fails('g:MyDefVarargs()', 'E119:', '', 1, 'Test_call_def_varargs')
   g:MyDefVarargs('one')->assert_equal('one,foo')
index 099a5fd0e40da795ebd52d3f4de4a48faffc00b1..ceab876163dc3b8c10cab9e0f663a4e0d8346008 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    47,
 /**/
     46,
 /**/
index ebab9ec136650237d87073e5df1c66efbb2b7102..89219996efc182ea6e6d57d0e22200a7d9e3ebd6 100644 (file)
@@ -1392,7 +1392,6 @@ compile_call(
     else
        *arg += varlen + 1;
 
-    *arg = skipwhite(*arg);
     if (compile_arguments(arg, cctx, &argcount, special_fn) == FAIL)
        goto theend;