From 31456074c8d9b600923ee19325584545919c523b Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Fri, 27 May 2011 21:56:09 +0000 Subject: histlexwords splitting of ";;" in case --- ChangeLog | 8 ++++++-- Src/hist.c | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 94b52c503..eeab2835c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-05-27 Peter Stephenson + + * 29403: Src/hist.c: histlexwords splitting of ";;" in case. + 2011-05-27 Mikael Magnusson * 28364: Doc/Zsh/zle.yo: Document that space left by wrapping @@ -28,7 +32,7 @@ 2011-05-27 Mikael Magnusson * 29331: NEWS: Note g:: parameter expansion flag. - + * 29365: Completion/Unix/Command/_make: redefine _make so that helper functions are only defined once. @@ -14870,5 +14874,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5343 $ +* $Revision: 1.5344 $ ***************************************************** diff --git a/Src/hist.c b/Src/hist.c index c368b5f4b..01a97da2b 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -2406,6 +2406,13 @@ readhistfile(char *fn, int err, int readflags) uselex = 0; break; } + } else if (!strcmp(word, ";") && strpfx(";;", pt)) { + /* + * Don't get confused between a semicolon that's + * probably really a newline and a double + * semicolon that's terminating a case. + */ + continue; } words[nwordpos++] = pt - start; pt += strlen(word); -- cgit 1.4.1