about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/hist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 2598baa5c..c7b4641df 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -2083,7 +2083,8 @@ savehistfile(char *fn, int err, int writeflags)
 	    hist_ignore_all_dups |= isset(HISTSAVENODUPS);
 	    readhistfile(fn, err, 0);
 	    hist_ignore_all_dups = isset(HISTIGNOREALLDUPS);
-	    savehistfile(fn, err, 0);
+	    if (histlinect)
+		savehistfile(fn, err, 0);
 	    deletehashtable(histtab);
 
 	    curhist = remember_curhist;