0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.1468: Vim9: invalid error for missing white space

Problem:    Vim9: invalid error for missing white space.
Solution:   Don't skip over white space after index. (closes #6718)
This commit is contained in:
Bram Moolenaar
2020-08-16 18:42:53 +02:00
parent e5abf7af08
commit f923571ec1
3 changed files with 10 additions and 1 deletions

View File

@@ -3624,7 +3624,7 @@ eval_index(
clear_tv(&var2); clear_tv(&var2);
return FAIL; return FAIL;
} }
*arg = skipwhite(*arg + 1); // skip the ']' *arg = *arg + 1; // skip over the ']'
} }
if (evaluate) if (evaluate)

View File

@@ -827,6 +827,13 @@ def Test_expr4_vim9script()
echo len('xxx') == 3 echo len('xxx') == 3
END END
CheckScriptSuccess(lines) CheckScriptSuccess(lines)
lines =<< trim END
vim9script
let line = 'abc'
echo line[1] =~ '\w'
END
CheckScriptSuccess(lines)
enddef enddef
func Test_expr4_fails() func Test_expr4_fails()

View File

@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1468,
/**/ /**/
1467, 1467,
/**/ /**/