From 6fea7f0d3c4d30ddc78db9e798a3ef9427abbc6f Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 10 Oct 2010 17:26:38 +0000 Subject: 28332: backslash-newline with HIST_LEX_WORDS --- Src/hist.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'Src/hist.c') 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; /* -- cgit 1.4.1