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

patch 8.2.2892: error message contains random characters

Problem:    Error message contains random characters.
Solution:   Pass the right pointer to error_white_both(). (closes #8272,
            closes #8263)
This commit is contained in:
mityu 2021-05-28 13:50:17 +02:00 committed by Bram Moolenaar
parent 543467136f
commit 89dcb4dce3
3 changed files with 11 additions and 2 deletions

View File

@ -2934,7 +2934,7 @@ eval5(char_u **arg, typval_T *rettv, evalarg_T *evalarg)
*/
if (evaluate && vim9script && !IS_WHITE_OR_NUL((*arg)[oplen]))
{
error_white_both(p, oplen);
error_white_both(*arg, oplen);
clear_tv(rettv);
return FAIL;
}

View File

@ -1220,7 +1220,14 @@ def Test_expr5_vim9script()
lines =<< trim END
echo 'a'.. 'b'
END
CheckDefAndScriptFailure(lines, 'E1004:', 1)
CheckDefAndScriptFailure(lines, 'E1004: White space required before and after ''..'' at ".. ''b''"', 1)
lines =<< trim END
echo 'a'
..'b'
# comment
END
CheckDefAndScriptFailure(lines, 'E1004: White space required before and after ''..'' at "..''b''"', 2)
# check invalid string concatenation
lines =<< trim END

View File

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