From 2e4db343c6e3974bb49970e349c008b3d32be53c Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 1 Oct 2004 19:48:44 +0000 Subject: - Call saveandpophiststack() with its new writeflags arg. - Use the new HFILE_NO_REWRITE flag when saving the history file after a signal was received. --- Src/builtin.c | 9 ++++++--- 1 file 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"); -- cgit 1.4.1