Patch 8.2.2013
Problem:    Vim9: not skipping white space after unary minus.
Solution:   Skip whitespace. (closes #7324)
Files:      src/vim9compile.c, src/testdir/test_vim9_expr.vim


*** ../vim-8.2.2012/src/vim9compile.c   2020-11-18 16:34:59.266884583 +0100
--- src/vim9compile.c   2020-11-18 17:37:41.642151289 +0100
***************
*** 3362,3367 ****
--- 3362,3369 ----
      while (p > start)
      {
        --p;
+       while (VIM_ISWHITE(*p))
+           --p;
        if (*p == '-' || *p == '+')
        {
            int     negate = *p == '-';
*** ../vim-8.2.2012/src/testdir/test_vim9_expr.vim      2020-11-18 
17:17:11.961928659 +0100
--- src/testdir/test_vim9_expr.vim      2020-11-18 17:32:40.363107607 +0100
***************
*** 2300,2311 ****
    CheckScriptSuccess(lines)
  enddef
  
! def Test_expr7_negate()
    assert_equal(-99, -99)
    assert_equal(99, --99)
    var nr = 88
    assert_equal(-88, -nr)
!   assert_equal(88, --nr)
  enddef
  
  def Echo(arg: any): string
--- 2300,2328 ----
    CheckScriptSuccess(lines)
  enddef
  
! def Test_expr7_negate_add()
    assert_equal(-99, -99)
+   assert_equal(-99, - 99)
    assert_equal(99, --99)
+   assert_equal(99, -- 99)
+   assert_equal(99, - - 99)
+   assert_equal(99, +99)
+   assert_equal(-99, -+99)
+   assert_equal(-99, -+ 99)
+   assert_equal(-99, - +99)
+   assert_equal(-99, - + 99)
+   assert_equal(-99, +-99)
+   assert_equal(-99, + -99)
+   assert_equal(-99, + - 99)
+ 
    var nr = 88
    assert_equal(-88, -nr)
!   assert_equal(-88, - nr)
!   assert_equal(-88, - +nr)
!   assert_equal(88, -- nr)
!   assert_equal(88, + nr)
!   assert_equal(88, --+ nr)
!   assert_equal(88, - - nr)
  enddef
  
  def Echo(arg: any): string
*** ../vim-8.2.2012/src/version.c       2020-11-18 17:17:11.965928644 +0100
--- src/version.c       2020-11-18 17:34:07.946831307 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2013,
  /**/

-- 
A cow comes flying over the battlements,  lowing aggressively.  The cow
lands on GALAHAD'S PAGE, squashing him completely.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202011181639.0AIGdXOV092980%40masaka.moolenaar.net.

Raspunde prin e-mail lui