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:
@@ -2853,6 +2853,7 @@ def Test_expr7_environment()
|
|||||||
CheckDefAndScriptSuccess(lines)
|
CheckDefAndScriptSuccess(lines)
|
||||||
|
|
||||||
CheckDefAndScriptFailure(["var x = $$$"], ['E1002:', 'E15:'], 1)
|
CheckDefAndScriptFailure(["var x = $$$"], ['E1002:', 'E15:'], 1)
|
||||||
|
CheckDefAndScriptFailure(["$"], ['E1002:', 'E15:'], 1)
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
def Test_expr7_register()
|
def Test_expr7_register()
|
||||||
|
@@ -750,6 +750,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 */
|
||||||
|
/**/
|
||||||
|
4049,
|
||||||
/**/
|
/**/
|
||||||
4048,
|
4048,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -1233,7 +1233,7 @@ compile_get_env(char_u **arg, cctx_T *cctx)
|
|||||||
len = get_env_len(arg);
|
len = get_env_len(arg);
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
{
|
{
|
||||||
semsg(_(e_syntax_error_at_str), start - 1);
|
semsg(_(e_syntax_error_at_str), start);
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user