From: Thomas Roessler Date: Tue, 30 Jan 2001 10:20:11 +0000 (+0000) Subject: Eric Fischer sent us this patch as part of bug#441. X-Git-Tag: mutt-1-3-15-rel~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33016f18ff44db179c44f9219be2907089948f44;p=mutt Eric Fischer sent us this patch as part of bug#441. I'm not entirely sure that it works, but let's try it. --- diff --git a/pager.c b/pager.c index 97042609..93bf767f 100644 --- 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;