tcsh/tcsh-6.24.10-history-merge.dif

25 lines
961 B
Plaintext

---
sh.hist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- sh.hist.c
+++ sh.hist.c 2023-07-21 09:38:31.303857784 +0000
@@ -64,7 +64,7 @@ static void hfree (struct Hist *);
/* #define DEBUG_HIST 1 */
-static const int fastMergeErase = 1;
+static const int fastMergeErase = 0; /* Was true, now false to merge even with full history list */
static unsigned histCount = 0; /* number elements on history list */
static int histlen = 0;
static struct Hist *histTail = NULL; /* last element on history list */
@@ -1393,7 +1393,7 @@ loadhist(Char *fname, int mflg)
/* During history merging (enthist sees mflg set), we disable management of
* Hnum and Href (because fastMergeErase is true). So now reset all the
* values based on the final ordering of the history list. */
- if (mflg) {
+ if (mflg && fastMergeErase) {
int n = eventno;
struct Hist *hp = &Histlist;
while ((hp = hp->Hnext))