]> granicus.if.org Git - vim/commitdiff
patch 8.2.1361: error for white space after expression in assignment v8.2.1361
authorBram Moolenaar <Bram@vim.org>
Tue, 4 Aug 2020 13:53:01 +0000 (15:53 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 4 Aug 2020 13:53:01 +0000 (15:53 +0200)
Problem:    Error for white space after expression in assignment.
Solution:   Skip over white space. (closes #6617)

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

index 87d2e16a7b37c2ca56e01378f9ea7894d581b177..cfa86ef2c50a8b5e9bed19a2678ddc78528c7e6d 100644 (file)
@@ -903,6 +903,7 @@ get_lval(
                    clear_tv(&var1);
                    return NULL;
                }
+               p = skipwhite(p);
            }
 
            // Optionally get the second index [ :expr].
index b13154304ce707c8e95b3fc71094d9eae4e684c7..b4eeea653b15d447a9e63b7c2f7a14b6476b469b 100644 (file)
@@ -55,6 +55,9 @@ func Test_dict()
   let d['a'] = 'aaa'
   call assert_equal('none', d[''])
   call assert_equal('aaa', d['a'])
+
+  let d[ 'b' ] = 'bbb'
+  call assert_equal('bbb', d[ 'b' ])
 endfunc
 
 func Test_strgetchar()
index 9e33c542fe2aee2c1ff67c3107b8e941313bd919..cb54f8cdb3a58e79b4632e6884407d7085e4bf21 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1361,
 /**/
     1360,
 /**/