diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2010-12-13 11:20:46 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2010-12-13 11:20:46 +0000 |
commit | 5858e79f4d942ab13414f5efaf6f280bac690060 (patch) | |
tree | 9ff94de5937f49527b36147afd7ec7b3cf510822 /Src | |
parent | 0a5702457b4074c72b201fb0eeb68b89763c7874 (diff) | |
download | zsh-5858e79f4d942ab13414f5efaf6f280bac690060.tar.gz zsh-5858e79f4d942ab13414f5efaf6f280bac690060.tar.xz zsh-5858e79f4d942ab13414f5efaf6f280bac690060.zip |
28526: remove bogus newline with stripped comment zplitting
Diffstat (limited to 'Src')
-rw-r--r-- | Src/lex.c | 10 |
1 files changed, 9 insertions, 1 deletions
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; |