about summary refs log tree commit diff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2004-10-01 19:48:44 +0000
committerWayne Davison <wayned@users.sourceforge.net>2004-10-01 19:48:44 +0000
commit2e4db343c6e3974bb49970e349c008b3d32be53c (patch)
treea1e9093d2d38735709bd909bdf77873c7c50f4f0 /Src/builtin.c
parent0c77a8e87680dce1664fa786ec98d4645522334e (diff)
downloadzsh-2e4db343c6e3974bb49970e349c008b3d32be53c.tar.gz
zsh-2e4db343c6e3974bb49970e349c008b3d32be53c.tar.xz
zsh-2e4db343c6e3974bb49970e349c008b3d32be53c.zip
- Call saveandpophiststack() with its new writeflags arg.
- Use the new HFILE_NO_REWRITE flag when saving the history
  file after a signal was received.
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index f13f07892..964e701fa 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -1340,7 +1340,7 @@ bin_fc(char *nam, char **argv, Options ops, int func)
 	    zwarnnam("fc", "too many arguments", NULL, 0);
 	    return 1;
 	}
-	return !saveandpophiststack(-1);
+	return !saveandpophiststack(-1, HFILE_USE_OPTIONS);
     }
     /* with the -m option, the first argument is taken *
      * as a pattern that history lines have to match   */
@@ -4111,8 +4111,11 @@ zexit(int val, int from_where)
     }
     if (isset(RCS) && interact) {
 	if (!nohistsave) {
-	    saveandpophiststack(1);
-	    savehistfile(NULL, 1, HFILE_USE_OPTIONS);
+	    int writeflags = HFILE_USE_OPTIONS;
+	    if (from_where == 1)
+		writeflags |= HFILE_NO_REWRITE;
+	    saveandpophiststack(1, writeflags);
+	    savehistfile(NULL, 1, writeflags);
 	}
 	if (islogin && !subsh) {
 	    sourcehome(".zlogout");