summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2000-10-19 07:12:26 +0000
committerWayne Davison <wayned@users.sourceforge.net>2000-10-19 07:12:26 +0000
commit4be4c7575c56432d028ee7a51ac6ba61abd54cee (patch)
tree9829560c35bc920619289f53e73073f210a6b789 /Src
parent7b967b0d5125125df8280119e63ae7d418d9b5ab (diff)
downloadzsh-4be4c7575c56432d028ee7a51ac6ba61abd54cee.tar.gz
zsh-4be4c7575c56432d028ee7a51ac6ba61abd54cee.tar.xz
zsh-4be4c7575c56432d028ee7a51ac6ba61abd54cee.zip
Don't call histreduceblanks() if the line didn't parse right.
Diffstat (limited to 'Src')
-rw-r--r--Src/hist.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 5b32748b5..4d803c0bd 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -1063,11 +1063,12 @@ hend(Eprog prog)
 	}
 #endif
 	/* get rid of pesky \n which we've already nulled out */
-	if (chwordpos > 1 && !chline[chwords[chwordpos-2]])
+	if (chwordpos > 1 && !chline[chwords[chwordpos-2]]) {
 	    chwordpos -= 2;
-	/* strip superfluous blanks, if desired */
-	if (isset(HISTREDUCEBLANKS))
-	    histreduceblanks();
+	    /* strip superfluous blanks, if desired */
+	    if (isset(HISTREDUCEBLANKS))
+		histreduceblanks();
+	}
 	if ((isset(HISTIGNOREDUPS) || isset(HISTIGNOREALLDUPS)) && he
 	 && histstrcmp(chline, he->text) == 0) {
 	    /* This history entry compares the same as the previous.