about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2012-04-21 18:42:56 +0000
committerBart Schaefer <barts@users.sourceforge.net>2012-04-21 18:42:56 +0000
commit19fe2dcc03d6f3c418e738061e46d0ae013c2550 (patch)
treefc785f52699b28bf9ae7e7c519f77498e979401b
parent8a5928841a6e4aae750a5bc790a1d0170b85f32e (diff)
downloadzsh-19fe2dcc03d6f3c418e738061e46d0ae013c2550.tar.gz
zsh-19fe2dcc03d6f3c418e738061e46d0ae013c2550.tar.xz
zsh-19fe2dcc03d6f3c418e738061e46d0ae013c2550.zip
30433: double backslash is not line continuation.
-rw-r--r--ChangeLog6
-rw-r--r--Src/hist.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e470032c..ea0a02f06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-04-21  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 30433: Src/hist.c: double backslash is not line continuation.
+
 2012-04-20  Mikael Magnusson  <mikachu@gmail.com>
 
 	* 30412: Doc/Zsh/zle.yo: Document the set-local-history
@@ -16219,5 +16223,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5635 $
+* $Revision: 1.5636 $
 *****************************************************
diff --git a/Src/hist.c b/Src/hist.c
index 4d522dddb..0e63dca37 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -2225,7 +2225,8 @@ readhistline(int start, char **bufp, int *bufsiz, FILE *in)
 	}
 	else {
 	    buf[len - 1] = '\0';
-	    if (len > 1 && buf[len - 2] == '\\') {
+	    if (len > 1 && buf[len - 2] == '\\' &&
+		(len < 3 || buf[len - 3] != '\\')) {
 		buf[--len - 1] = '\n';
 		if (!feof(in))
 		    return readhistline(len, bufp, bufsiz, in);