about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-01 14:48:28 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-01 14:48:28 +0000
commit61e68d70da5af5afe943f92cd94a8c96e78348d9 (patch)
tree1e88adbfc21452caedcb57af2880097a349f44e6 /Src/hist.c
parent14810d6df13e0564a606b74e4c4e918e80862e25 (diff)
downloadzsh-61e68d70da5af5afe943f92cd94a8c96e78348d9.tar.gz
zsh-61e68d70da5af5afe943f92cd94a8c96e78348d9.tar.xz
zsh-61e68d70da5af5afe943f92cd94a8c96e78348d9.zip
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 167ffe171..52e3e1394 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -700,7 +700,7 @@ hbegin(int dohist)
 {
     isfirstln = isfirstch = 1;
     errflag = histdone = spaceflag = 0;
-    stophist = (dohist ? ((!interact || unset(SHINSTDIN)) << 1) : 2);
+    stophist = (!dohist || !interact || unset(SHINSTDIN)) ? 2 : 0;
     if (stophist == 2 || (inbufflags & INP_ALIAS)) {
 	chline = hptr = NULL;
 	hlinesz = 0;
@@ -721,6 +721,8 @@ hbegin(int dohist)
 	hwbegin = ihwbegin;
 	hwend = ihwend;
 	addtoline = iaddtoline;
+	if (!isset(BANGHIST))
+	    stophist = 4;
     }
     chwordpos = 0;