From: Kevin McCarthy Date: Fri, 4 Oct 2019 07:29:03 +0000 (+0800) Subject: Fix built-in pager checks for help and attachments. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48cf1092935c5fbe4f56377d8cf575867466bcba;p=mutt Fix built-in pager checks for help and attachments. Mutt uses the built-in pager when $pager is unset too. Fix a few checks to also handle that case. --- diff --git a/help.c b/help.c index 735aa5d7..347da1ee 100644 --- 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; diff --git a/muttlib.c b/muttlib.c index 8f0b72f5..f63c2e28 100644 --- 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); }