lib: Invalidate message metadata in _notmuch_message_gen_terms
authorAustin Clements <amdragon@MIT.EDU>
Fri, 1 Aug 2014 02:59:27 +0000 (22:59 -0400)
committerDavid Bremner <david@tethera.net>
Mon, 4 Aug 2014 21:57:55 +0000 (18:57 -0300)
Previously, we invalidated stored message metadata in
_notmuch_message_add_term and _notmuch_message_remove_term, but not in
_notmuch_message_gen_terms.  This doesn't currently result in any bugs
because of our limited uses of _notmuch_message_gen_terms, but it may
could cause trouble in the future.

lib/message.cc

index e6a5a5af9651d207b01ca755e6adbba700fc0a85..90a01eb8839b27ebc25d59b32cb02e7e282244b9 100644 (file)
@@ -1032,6 +1032,8 @@ _notmuch_message_gen_terms (notmuch_message_t *message,
        /* Create a gap between this an the next terms so they don't
         * appear to be a phrase. */
        message->termpos = term_gen->get_termpos () + 100;
+
+       _notmuch_message_invalidate_metadata (message, prefix_name);
     }
 
     term_gen->set_termpos (message->termpos);