diff options
author | Wayne Davison <wayned@users.sourceforge.net> | 2004-10-01 19:48:53 +0000 |
---|---|---|
committer | Wayne Davison <wayned@users.sourceforge.net> | 2004-10-01 19:48:53 +0000 |
commit | 89eb92d8c270561a5f7d6e24114b3febf3078e24 (patch) | |
tree | 15f3d52ee2819f902322dcca5728b7f83051d602 /Src/hist.c | |
parent | 2e4db343c6e3974bb49970e349c008b3d32be53c (diff) | |
download | zsh-89eb92d8c270561a5f7d6e24114b3febf3078e24.tar.gz zsh-89eb92d8c270561a5f7d6e24114b3febf3078e24.tar.xz zsh-89eb92d8c270561a5f7d6e24114b3febf3078e24.zip |
- Added an arg to saveandpophiststack() to allow the caller to
specify what flags to send to savehistfile(). - Implemented the HFILE_NO_REWRITE support in savehistfile().
Diffstat (limited to 'Src/hist.c')
-rw-r--r-- | Src/hist.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Src/hist.c b/Src/hist.c index 74b302cff..da1e15ccc 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -2093,7 +2093,8 @@ savehistfile(char *fn, int err, int writeflags) } fclose(out); - if ((writeflags & (HFILE_SKIPOLD | HFILE_FAST)) == HFILE_SKIPOLD) { + if (writeflags & HFILE_SKIPOLD + && !(writeflags & (HFILE_FAST | HFILE_NO_REWRITE))) { int remember_histactive = histactive; /* Zeroing histactive avoids unnecessary munging of curline. */ @@ -2445,7 +2446,7 @@ pophiststack(void) /**/ int -saveandpophiststack(int pop_through) +saveandpophiststack(int pop_through, int writeflags) { if (pop_through <= 0) { pop_through += histsave_stack_pos + 1; @@ -2459,7 +2460,7 @@ saveandpophiststack(int pop_through) return 0; do { if (!nohistsave) - savehistfile(NULL, 1, HFILE_USE_OPTIONS); + savehistfile(NULL, 1, writeflags); pophiststack(); } while (histsave_stack_pos >= pop_through); return 1; |