diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-04 22:12:28 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-08-14 18:20:28 -0400 |
commit | 037f5320767060d33c2b12cad17eefdeec66002a (patch) | |
tree | 9f000bc13fee40c95b4369595698bc7f815f9e4e /src | |
parent | 9abfb852647066d87b3a0f7caa63ca991987ecd7 (diff) | |
download | rneovim-037f5320767060d33c2b12cad17eefdeec66002a.tar.gz rneovim-037f5320767060d33c2b12cad17eefdeec66002a.tar.bz2 rneovim-037f5320767060d33c2b12cad17eefdeec66002a.zip |
vim-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 vim/vim#6617)
https://github.com/vim/vim/commit/6a25026262e2cdbbd8738361c5bd6ebef8862d87
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/eval.c | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_expr.vim | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index df8b765c1c..3ab50878a8 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -2086,6 +2086,7 @@ char_u *get_lval(char_u *const name, typval_T *const rettv, tv_clear(&var1); return NULL; } + p = skipwhite(p); } // Optionally get the second index [ :expr]. diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim index 264d8b000f..b8d6f5aa7d 100644 --- a/src/nvim/testdir/test_expr.vim +++ b/src/nvim/testdir/test_expr.vim @@ -49,6 +49,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() |