]> granicus.if.org Git - neomutt/commitdiff
Don't filter new entries when compacting history save file.
authorKevin McCarthy <kevin@8t8.us>
Sat, 13 May 2017 16:48:28 +0000 (09:48 -0700)
committerKevin McCarthy <kevin@8t8.us>
Sat, 13 May 2017 16:48:28 +0000 (09:48 -0700)
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

index ea9223e2ab0a6a8fb9651d968b0e34eb34575c6d..4e00384d3099fe7f71e48c420d17b48f2e3d2614 100644 (file)
--- 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)