From d17398b442de23ab999593fb74f082b6f6112a5e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 24 Sep 2008 19:19:56 +0000 Subject: users/13288: Src/parse.c: don't report parse errors on aborted lines --- ChangeLog | 5 +++++ Src/parse.c | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6acf6b46c..6eeb47d7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-24 Peter Stephenson + + * users/13288: Src/parse.c: don't report parse errors if the + line was aborted by spell checking etc. + 2008-09-24 Peter Stephenson * 25739: configure.ac: warn about GPL in binary if libgdm diff --git a/Src/parse.c b/Src/parse.c index 1b9a561e0..eea68cd8c 100644 --- a/Src/parse.c +++ b/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; } -- cgit 1.4.1