From: Mehdi ABAAKOUK Date: Tue, 7 Mar 2017 12:02:43 +0000 (+0100) Subject: attachment/pager: Use mailcap for test/* except plain (#449) X-Git-Tag: neomutt-20170414~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f62d8987721265f91d38552705e3facbb20be0c6;p=neomutt attachment/pager: Use mailcap for test/* except plain (#449) * attachment: Use mailcap for test/* except plain This change makes attachment view using mailcap for everything not text/plain. * pager: Don't assume all text/* are plaintext This change removes the assumption that all text/* are humain readable plaintext. Closes #430 --- diff --git a/handler.c b/handler.c index fdf8c7b06..2900ed841 100644 --- a/handler.c +++ b/handler.c @@ -1823,7 +1823,7 @@ int mutt_body_handler (BODY *b, STATE *s) else if (ascii_strcasecmp ("enriched", b->subtype) == 0) handler = text_enriched_handler; else /* text body type without a handler */ - plaintext = 1; + plaintext = 0; } else if (b->type == TYPEMESSAGE) { diff --git a/muttlib.c b/muttlib.c index 5dd8fdc8e..3e9d0f264 100644 --- a/muttlib.c +++ b/muttlib.c @@ -734,10 +734,9 @@ int mutt_needs_mailcap (BODY *m) switch (m->type) { case TYPETEXT: - /* we can display any text, overridable by auto_view */ - return 0; + if (!ascii_strcasecmp ("plain", m->subtype)) + return 0; break; - case TYPEAPPLICATION: if((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp(m)) return 0;