mirror of git://git.code.sf.net/p/zsh/code
users/13288: Src/parse.c: don't report parse errors on aborted lines
This commit is contained in:
parent
602cc2abe0
commit
d17398b442
|
@ -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
|
||||
|
|
14
Src/parse.c
14
Src/parse.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue