From e297455dd18d16a32fb5004fd7990380dcc20515 Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Sat, 13 May 2017 09:48:28 -0700 Subject: [PATCH] Don't filter new entries when compacting history save file. If new entries are added between the two passes, they won't be in the dup_hash. The original intent was to filter added duplicates, but the check would also filter brand new entries. --- history.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/history.c b/history.c index ea9223e2a..4e00384d3 100644 --- a/history.c +++ b/history.c @@ -244,7 +244,7 @@ static void shrink_histfile (void) continue; *p = '\0'; if (option (OPTHISTREMOVEDUPS) && - (dup_hash_dec (dup_hashes[hclass], linebuf + read) != 0)) + (dup_hash_dec (dup_hashes[hclass], linebuf + read) > 0)) continue; *p = '|'; if (n[hclass]-- <= SaveHist) -- 2.40.0