1
0
forked from aniani/vim

patch 8.2.4049: Vim9: reading before the start of the line with "$"

Problem:    Vim9: reading before the start of the line with "$" by itself.
Solution:   Do not subtract one when reporting the error.
This commit is contained in:
Bram Moolenaar
2022-01-09 13:36:28 +00:00
parent c14f667626
commit 5f25c38550
3 changed files with 4 additions and 1 deletions

View File

@@ -2853,6 +2853,7 @@ def Test_expr7_environment()
CheckDefAndScriptSuccess(lines)
CheckDefAndScriptFailure(["var x = $$$"], ['E1002:', 'E15:'], 1)
CheckDefAndScriptFailure(["$"], ['E1002:', 'E15:'], 1)
enddef
def Test_expr7_register()

View File

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

View File

@@ -1233,7 +1233,7 @@ compile_get_env(char_u **arg, cctx_T *cctx)
len = get_env_len(arg);
if (len == 0)
{
semsg(_(e_syntax_error_at_str), start - 1);
semsg(_(e_syntax_error_at_str), start);
return FAIL;
}