changeset 21622:1f2066e3975a v8.2.1361

patch 8.2.1361: error for white space after expression in assignment Commit: https://github.com/vim/vim/commit/6a25026262e2cdbbd8738361c5bd6ebef8862d87 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 4 15:53:01 2020 +0200 patch 8.2.1361: error for white space after expression in assignment Problem: Error for white space after expression in assignment. Solution: Skip over white space. (closes https://github.com/vim/vim/issues/6617)
author Bram Moolenaar <Bram@vim.org>
date Tue, 04 Aug 2020 16:00:04 +0200
parents 1ff1931aa192
children a9bc567389ff
files src/eval.c src/testdir/test_expr.vim src/version.c
diffstat 3 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -903,6 +903,7 @@ get_lval(
 		    clear_tv(&var1);
 		    return NULL;
 		}
+		p = skipwhite(p);
 	    }
 
 	    // Optionally get the second index [ :expr].
--- a/src/testdir/test_expr.vim
+++ b/src/testdir/test_expr.vim
@@ -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()
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1361,
+/**/
     1360,
 /**/
     1359,