about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
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);