]> granicus.if.org Git - mutt/commitdiff
Fix built-in pager checks for help and attachments.
authorKevin McCarthy <kevin@8t8.us>
Fri, 4 Oct 2019 07:29:03 +0000 (15:29 +0800)
committerKevin McCarthy <kevin@8t8.us>
Fri, 4 Oct 2019 07:30:08 +0000 (15:30 +0800)
Mutt uses the built-in pager when $pager is unset too.  Fix a few
checks to also handle that case.

help.c
muttlib.c

diff --git a/help.c b/help.c
index 735aa5d703cd316f0542ff7855fd644e90b08492..347da1eee5e872a3b53fa190b0dad419bc1a635e 100644 (file)
--- a/help.c
+++ b/help.c
@@ -224,7 +224,7 @@ static void format_line (FILE *f, int ismacro,
 
   if (ismacro > 0)
   {
-    if (!mutt_strcmp (Pager, "builtin"))
+    if (!Pager || !mutt_strcmp (Pager, "builtin"))
       fputs ("_\010", f);
     fputs ("M ", f);
     col += 2;
@@ -264,7 +264,7 @@ static void format_line (FILE *f, int ismacro,
 
       if (*t3)
       {
-        if (mutt_strcmp (Pager, "builtin"))
+        if (Pager && mutt_strcmp (Pager, "builtin"))
        {
          fputc ('\n', f);
          n = 0;
index 8f0b72f5dad689daa74418bf378202a51e784078..f63c2e28e0ecb6b6c46fc9049ee985675ff33384 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -1947,13 +1947,15 @@ int state_printf (STATE *s, const char *fmt, ...)
 
 void state_mark_attach (STATE *s)
 {
-  if ((s->flags & MUTT_DISPLAY) && !mutt_strcmp (Pager, "builtin"))
+  if ((s->flags & MUTT_DISPLAY) &&
+      (!Pager || !mutt_strcmp (Pager, "builtin")))
     state_puts (AttachmentMarker, s);
 }
 
 void state_mark_protected_header (STATE *s)
 {
-  if ((s->flags & MUTT_DISPLAY) && !mutt_strcmp (Pager, "builtin"))
+  if ((s->flags & MUTT_DISPLAY) &&
+      (!Pager || !mutt_strcmp (Pager, "builtin")))
     state_puts (ProtectedHeaderMarker, s);
 }