<<< Date Index >>>     <<< Thread Index >>>

[Mutt] #3099: (pager.c) Background of quoted text doesn't fill the whole line



#3099: (pager.c) Background of quoted text doesn't fill the whole line

 In the pager, suppose there is a quoted line

 {{{
 >> abcd
 }}}

 Only the background of "abcd" is painted with the color specified in
 muttrc, resulting in ugly quoted blocks.  The correct behavior should be
 to paint the background of the _whole line_.

 Something like the following should fix it.
 (But please double check, since I modified pager.c at multiple places and
 I'm not quite sure this is indeed the trunk fixing this problem).


 In pager.c:
 {{{
      else
        def_color = ColorDefs[ (*lineInfo)[m].type ];

 +    if ((*lineInfo)[m].type == MT_COLOR_QUOTED) {
 +        struct q_class_t *class = (*lineInfo)[m].quote;
 +
 +        if (class)
 +        {
 +          def_color = class->color;
 +
 +          while (class && class->length > cnt)
 +          {
 +           def_color = class->color;
 +           class = class->up;
 +          }
 +        }
 +    }
 +
 +
      attrset (def_color);
  #ifdef HAVE_BKGDSET
      bkgdset (def_color | ' ');
 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3099>