X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-index-message.cc;h=561cb3a47278212e19fdacd6748953eb27e2570a;hp=51c9f049d99190c7c1240ed450f9f92f91091bf1;hb=09f765ce186e81bd9eae85910d0444000fd26277;hpb=3922bb4cfda9d7e778a6cbf2bc8dee8ce2f9e140 diff --git a/notmuch-index-message.cc b/notmuch-index-message.cc index 51c9f049..561cb3a4 100644 --- a/notmuch-index-message.cc +++ b/notmuch-index-message.cc @@ -215,6 +215,9 @@ add_terms_references (Xapian::Document doc, refs = g_mime_object_get_header (GMIME_OBJECT (message), "references"); + if (refs == NULL) + return; + while (*refs) { while (*refs && isspace (*refs)) refs++; @@ -307,7 +310,9 @@ gen_terms_body (Xapian::TermGenerator term_gen, /* Skip signatures */ /* XXX: Should only do this if "near" the end of the message. */ - if (strncmp (body_line, "-- ", 3) == 0) + if (strncmp (body_line, "-- ", 3) == 0 || + strncmp (body_line, "----------", 10) == 0 || + strncmp (body_line, "__________", 10) == 0) break; gen_terms (term_gen, "body", body_line);