# HG changeset patch # User Bram Moolenaar # Date 1596549604 -7200 # Node ID 1f2066e3975a80f7a511698b07bab025442d6b48 # Parent 1ff1931aa1926a372f7fc6c69493052b5a4472f9 patch 8.2.1361: error for white space after expression in assignment Commit: https://github.com/vim/vim/commit/6a25026262e2cdbbd8738361c5bd6ebef8862d87 Author: Bram Moolenaar 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) diff --git a/src/eval.c b/src/eval.c --- 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]. diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim --- 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() diff --git a/src/version.c b/src/version.c --- 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,