Skip to content

Commit

Permalink
patch 8.2.4049: Vim9: reading before the start of the line with "$"
Browse files Browse the repository at this point in the history
Problem:    Vim9: reading before the start of the line with "$" by itself.
Solution:   Do not subtract one when reporting the error.
  • Loading branch information
brammool committed Jan 9, 2022
1 parent c14f667 commit 5f25c38
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/testdir/test_vim9_expr.vim
Expand Up @@ -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()
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4049,
/**/
4048,
/**/
Expand Down
2 changes: 1 addition & 1 deletion src/vim9expr.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 5f25c38

Please sign in to comment.