]> granicus.if.org Git - neomutt/commitdiff
attachment/pager: Use mailcap for test/* except plain (#449)
authorMehdi ABAAKOUK <sileht@sileht.net>
Tue, 7 Mar 2017 12:02:43 +0000 (13:02 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 7 Mar 2017 12:02:43 +0000 (12:02 +0000)
* 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

handler.c
muttlib.c

index fdf8c7b069de91f36f7e01b943785cdff22e8bb7..2900ed841375fad47cef6101bfb4e056c34a79f4 100644 (file)
--- 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)
   {
index 5dd8fdc8e97df859cb33f7c31c1ec6a606e00840..3e9d0f264ce55785c454de41e40579d1bad9824c 100644 (file)
--- 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;