about summary refs log tree commit diff
path: root/Src/hist.c
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 /Src/hist.c
parentb197c9dbfb79798cd48b49d2180ad212af6c9a46 (diff)
downloadzsh-31456074c8d9b600923ee19325584545919c523b.tar.gz
zsh-31456074c8d9b600923ee19325584545919c523b.tar.xz
zsh-31456074c8d9b600923ee19325584545919c523b.zip
histlexwords splitting of ";;" in case
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c7
1 files changed, 7 insertions, 0 deletions
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);