rework OPTWEED handling a bit.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
** When \fIunset\fP, Madmutt will not collapse a thread if it contains any
** unread messages.
*/
- {"count_attachments", DT_BOOL, R_NONE, OPTCOUNTATTACH, "yes"},
- /*
- ** .pp
- ** This variable controls whether attachments should be counted for $$$index_format
- ** and its \fT%X\fP expando or not. As for scoring, this variable can be used to
- ** selectively turn counting on or off instead of removing and re-adding rules as
- ** prefered because counting requires full loading of messages.
- ** .pp
- ** If it is \fIset\fP and rules were defined via the \fTattachments\fP and/or
- ** \fTunattachments\fP commands, counting will be done. If it is \fIunset\fP no
- ** counting will be done regardless whether rules were defined or not.
- */
{"uncollapse_jump", DT_BOOL, R_NONE, OPTUNCOLLAPSEJUMP, "no" },
/*
** .pp
/* restore the original line */
line[m_strlen(line)] = ':';
- if (weed && option(OPTWEED) && mutt_matches_ignore(line, Ignore)
+ if (weed && mutt_matches_ignore(line, Ignore)
&& !mutt_matches_ignore(line, UnIgnore)) {
break;
}
int mutt_count_body_parts(HEADER *hdr, int flags)
{
- if (!option(OPTCOUNTATTACH))
- return 0;
-
if (hdr->attach_valid && !(flags & M_PARTS_RECOUNT))
return hdr->attach_total;
{
int count = 0;
- if (option (OPTCOUNTATTACH)) {
- if (!hdr->content->parts)
- mutt_parse_mime_message(ctx, hdr);
- count = mutt_count_body_parts(hdr, 0);
- }
-
/* The recursion allows messages without depth to return 0. */
if (optional)
optional = count != 0;
OPTCOLLAPSEUNREAD,
OPTCONFIRMAPPEND,
OPTCONFIRMCREATE,
- OPTCOUNTATTACH,
OPTDELETEUNTAG,
OPTDELSP,
OPTDIGESTCOLLAPSE,
{
HEADER *msg = header_new();
- if (mutt_prepare_template (fp, ctx, msg, cur, 1) < 0)
+ if (mutt_prepare_template (fp, ctx, msg, cur, option(OPTWEED)) < 0)
return -1;
return ci_send_message (SENDRESEND, msg, NULL, ctx, cur);