about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-05-27 21:56:09 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-05-27 21:56:09 +0000
commit31456074c8d9b600923ee19325584545919c523b (patch)
tree465c79db096284cbdb1e3dcf8e9fe7bb5098b792
parentb197c9dbfb79798cd48b49d2180ad212af6c9a46 (diff)
downloadzsh-31456074c8d9b600923ee19325584545919c523b.tar.gz
zsh-31456074c8d9b600923ee19325584545919c523b.tar.xz
zsh-31456074c8d9b600923ee19325584545919c523b.zip
histlexwords splitting of ";;" in case
-rw-r--r--ChangeLog8
-rw-r--r--Src/hist.c7
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  <p.w.stephenson@ntlworld.com>
+
+	* 29403: Src/hist.c: histlexwords splitting of ";;" in case.
+
 2011-05-27  Mikael Magnusson <mikachu@gmail.com>
 
 	* 28364: Doc/Zsh/zle.yo: Document that space left by wrapping
@@ -28,7 +32,7 @@
 2011-05-27  Mikael Magnusson <mikachu@gmail.com>
 
 	* 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);