aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-08-04 22:12:28 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-08-14 18:20:28 -0400
commit037f5320767060d33c2b12cad17eefdeec66002a (patch)
tree9f000bc13fee40c95b4369595698bc7f815f9e4e
parent9abfb852647066d87b3a0f7caa63ca991987ecd7 (diff)
downloadrneovim-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
-rw-r--r--src/nvim/eval.c1
-rw-r--r--src/nvim/testdir/test_expr.vim3
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()