users/13288: Src/parse.c: don't report parse errors on aborted lines

This commit is contained in:
Peter Stephenson 2008-09-24 19:19:56 +00:00
parent 602cc2abe0
commit d17398b442
2 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2008-09-24 Peter Stephenson <p.w.stephenson@ntlworld.com>
* users/13288: Src/parse.c: don't report parse errors if the
line was aborted by spell checking etc.
2008-09-24 Peter Stephenson <pws@csr.com>
* 25739: configure.ac: warn about GPL in binary if libgdm

View File

@ -2205,12 +2205,14 @@ yyerror(int noerr)
for (t0 = 0; t0 != 20; t0++)
if (!t || !t[t0] || t[t0] == '\n')
break;
if (t0 == 20)
zwarn("parse error near `%l...'", t, 20);
else if (t0)
zwarn("parse error near `%l'", t, t0);
else
zwarn("parse error");
if (!(histdone & HISTFLAG_NOEXEC)) {
if (t0 == 20)
zwarn("parse error near `%l...'", t, 20);
else if (t0)
zwarn("parse error near `%l'", t, t0);
else
zwarn("parse error");
}
if (!noerr && noerrs != 2)
errflag = 1;
}