]> granicus.if.org Git - vim/commitdiff
patch 8.2.2892: error message contains random characters v8.2.2892
authormityu <mityu.mail@gmail.com>
Fri, 28 May 2021 11:50:17 +0000 (13:50 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 28 May 2021 11:50:17 +0000 (13:50 +0200)
Problem:    Error message contains random characters.
Solution:   Pass the right pointer to error_white_both(). (closes #8272,
            closes #8263)

src/eval.c
src/testdir/test_vim9_expr.vim
src/version.c

index b5820b8d3263e0f821555d1a8e8406f924f31ae0..f75263d9e8c0b8390d24cc88c5baf4b5451f2051 100644 (file)
@@ -2934,7 +2934,7 @@ eval5(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
         */
        if (evaluate && vim9script && !IS_WHITE_OR_NUL((*arg)[oplen]))
        {
-           error_white_both(p, oplen);
+           error_white_both(*arg, oplen);
            clear_tv(rettv);
            return FAIL;
        }
index 3ca1f342cca52cabeca95db5f3b157724902c84e..f1762d7d0b5ae2efadbbb5591157e8738540ecd8 100644 (file)
@@ -1220,7 +1220,14 @@ def Test_expr5_vim9script()
   lines =<< trim END
       echo 'a'.. 'b'
   END
-  CheckDefAndScriptFailure(lines, 'E1004:', 1)
+  CheckDefAndScriptFailure(lines, 'E1004: White space required before and after ''..'' at ".. ''b''"', 1)
+
+  lines =<< trim END
+      echo 'a'
+          ..'b'
+      # comment
+  END
+  CheckDefAndScriptFailure(lines, 'E1004: White space required before and after ''..'' at "..''b''"', 2)
 
   # check invalid string concatenation
   lines =<< trim END
index 775c4f496ada5780fac2db00243f03964272614b..fb8a7ad92a4faa16eb780692315aa08d3b75bd56 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2892,
 /**/
     2891,
 /**/