]> granicus.if.org Git - mutt/commitdiff
Eric Fischer <eric@eazel.com> sent us this patch as part of bug#441.
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 30 Jan 2001 10:20:11 +0000 (10:20 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 30 Jan 2001 10:20:11 +0000 (10:20 +0000)
I'm not entirely sure that it works, but let's try it.

pager.c

diff --git a/pager.c b/pager.c
index 97042609c6e87cd1d7b753bb1e7ac08d34c2e8ba..93bf767f3746641b4eaa95f564e46c8965cc83f7 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -257,14 +257,14 @@ resolve_color (struct line_t *lineInfo, int n, int cnt, int flags, int special,
   /* handle "special" bold & underlined characters */
   if (special || a->attr)
   {
-    if (special == A_BOLD || (a->attr & ANSI_BOLD))
+    if ((special & A_BOLD) || (a->attr & ANSI_BOLD))
     {
       if (ColorDefs[MT_COLOR_BOLD] && !search)
        color = ColorDefs[MT_COLOR_BOLD];
       else
        color ^= A_BOLD;
     }
-    else if (special == A_UNDERLINE || (a->attr & ANSI_UNDERLINE))
+    if ((special & A_UNDERLINE) || (a->attr & ANSI_UNDERLINE))
     {
       if (ColorDefs[MT_COLOR_UNDERLINE] && !search)
        color = ColorDefs[MT_COLOR_UNDERLINE];
@@ -1023,17 +1023,17 @@ static int format_line (struct line_t **lineInfo, int n, unsigned char *buf,
       {
        if (wc == wc1)
        {
-         special = (wc == '_' && special == A_UNDERLINE)
+         special |= (wc == '_' && special & A_UNDERLINE)
            ? A_UNDERLINE : A_BOLD;
        }
        else if (wc == '_' || wc1 == '_')
        {
-         special = A_UNDERLINE;
+         special |= A_UNDERLINE;
          wc = (wc1 == '_') ? wc : wc1;
        }
        else
        {
-         special = 0; /* overstrike: nothing to do! */
+         /* special = 0; / * overstrike: nothing to do! */
          wc = wc1;
        }
        ch += k1;