From 5858e79f4d942ab13414f5efaf6f280bac690060 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 13 Dec 2010 11:20:46 +0000 Subject: 28526: remove bogus newline with stripped comment zplitting --- Src/lex.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Src/lex.c') diff --git a/Src/lex.c b/Src/lex.c index 44cfa17ca..20511f54e 100644 --- a/Src/lex.c +++ b/Src/lex.c @@ -800,7 +800,15 @@ gettok(void) hwbegin(0); hwaddc('\n'); addtoline('\n'); - peek = NEWLIN; + /* + * If splitting a line and removing comments, + * we don't want a newline token since it's + * treated specially. + */ + if (zleparse == 3 && lexstop) + peek = ENDINPUT; + else + peek = NEWLIN; } } return peek; -- cgit 1.4.1