diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-16 18:42:53 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-16 18:42:53 +0200 |
commit | f923571ec17b6caeeb7f4abfd7eec3f707ab9c45 (patch) | |
tree | 490d04346ddc61143ade2158206ab510ec3a91ca | |
parent | e5abf7af08ff69e7e038c067497f080d4e44332c (diff) | |
download | vim-git-8.2.1468.tar.gz |
patch 8.2.1468: Vim9: invalid error for missing white spacev8.2.1468
Problem: Vim9: invalid error for missing white space.
Solution: Don't skip over white space after index. (closes #6718)
-rw-r--r-- | src/eval.c | 2 | ||||
-rw-r--r-- | src/testdir/test_vim9_expr.vim | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 37ed5153e..3c4a8c562 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3624,7 +3624,7 @@ eval_index( clear_tv(&var2); return FAIL; } - *arg = skipwhite(*arg + 1); // skip the ']' + *arg = *arg + 1; // skip over the ']' } if (evaluate) diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim index 01ac3e615..ee68537e7 100644 --- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -827,6 +827,13 @@ def Test_expr4_vim9script() echo len('xxx') == 3 END CheckScriptSuccess(lines) + + lines =<< trim END + vim9script + let line = 'abc' + echo line[1] =~ '\w' + END + CheckScriptSuccess(lines) enddef func Test_expr4_fails() diff --git a/src/version.c b/src/version.c index c8794ce92..19a870468 100644 --- 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 */ /**/ + 1468, +/**/ 1467, /**/ 1466, |