about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/hist.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 1c626fd76..0eeb98fb0 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -2358,8 +2358,18 @@ readhistfile(char *fn, int err, int readflags)
 		     incnode(wordnode)) {
 		    char *word = getdata(wordnode);
 
-		    while (inblank(*pt))
-			pt++;
+		    for (;;) {
+			/*
+			 * Not really an oddity: "\\\n" is
+			 * removed from input as if whitespace.
+			 */
+			if (inblank(*pt))
+			    pt++;
+			else if (strpfx("\\\n", pt))
+			    pt += 2;
+			else
+			    break;
+		    }
 		    if (!strpfx(word, pt)) {
 			int bad = 0;
 			/*