1
0
forked from aniani/vim

patch 8.2.2107: Vim9: some errors not tested

Problem:    Vim9: some errors not tested.
Solution:   Add tests.  Fix getting the right error.
This commit is contained in:
Bram Moolenaar
2020-12-07 21:49:52 +01:00
parent b237ae7b83
commit 8ff16e0183
4 changed files with 56 additions and 14 deletions

View File

@@ -2229,6 +2229,7 @@ may_get_next_line_error(char_u *whitep, char_u **arg, cctx_T *cctx)
{
if (may_get_next_line(whitep, arg, cctx) == FAIL)
{
SOURCING_LNUM = cctx->ctx_lnum + 1;
emsg(_(e_line_incomplete));
return FAIL;
}
@@ -5300,7 +5301,7 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx)
wp = op + oplen;
p = skipwhite(wp);
if (may_get_next_line(wp, &p, cctx) == FAIL)
if (may_get_next_line_error(wp, &p, cctx) == FAIL)
return FAIL;
if (compile_expr0(&p, cctx) == FAIL)
return NULL;