summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2013-10-07 11:43:55 +0100
committerPeter Stephenson <pws@zsh.org>2013-10-07 11:43:55 +0100
commit9345e57859eda273d2d14346fa48e15b109fbe2d (patch)
tree8a3955e31bac2586a395bbe573c596cd17976767
parent7e4fd18519a02de10c0f25e57590267510b5d77e (diff)
downloadzsh-9345e57859eda273d2d14346fa48e15b109fbe2d.tar.gz
zsh-9345e57859eda273d2d14346fa48e15b109fbe2d.zip
31793: Fix problem with non-interactive history.
Modify 31789 so it doesn't try to save history from hbegin() in that case.
-rw-r--r--ChangeLog5
-rw-r--r--Src/hist.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 670b40824..be2f1b1e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-07 Peter Stephenson <p.stephenson@samsung.com>
+
+ * 31793: Src/hist.c (hbegin): Modify 31789 so that the save
+ history here only happens for interactive editing.
+
2013-10-06 Wayne Davison <wayned@users.sourceforge.net>
* users/18024: Completion/Unix/Command/_rsync: add new options for
diff --git a/Src/hist.c b/Src/hist.c
index 1961d8350..c58ce8b34 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -928,7 +928,7 @@ hbegin(int dohist)
histactive = HA_ACTIVE | HA_NOINC;
hf = getsparam("HISTFILE");
- if (isset(INCAPPENDHISTORY))
+ if (isset(INCAPPENDHISTORY) && !(histactive & HA_NOINC) && !strin)
savehistfile(hf, 0, HFILE_USE_OPTIONS | HFILE_FAST);
}