summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);