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

Re: Display bug in the index with arrow_cursor



On Tue, Mar 29, 2005 at 03:38:10PM +0200, Vincent Lefevre wrote:
> When arrow_cursor is set, the corresponding 2 characters for
> the non-selected messages have the default background (here,
> black). I assume that this is expected. Now, if I select a
> message for which the background color (in the index) is not
> the default one, and select another message, the arrow cursor
> is replaced by two spaces with the background of the message.
> This is wrong. The default background should have been used
> instead.
> 
> The third character also sometimes get the background of the
> message, but this is not always reproducible.

I'm not sure what the intended coloring is, but
the bug is in redraw_index (menu.c).

-- 
tamo
--- menu.c.BAK  2005-03-29 22:13:46.000000000 +0900
+++ menu.c      2005-03-29 22:35:22.000000000 +0900
@@ -221,10 +221,11 @@
 
        if (i == menu->current)
        {
-          attrset (menu->color (i));
          ADDCOLOR (MT_COLOR_INDICATOR);
+         BKGDSET (MT_COLOR_INDICATOR);
          addstr ("->");
-          attrset (menu->color (i));
+         SETCOLOR (MT_COLOR_NORMAL);          
+         BKGDSET (MT_COLOR_NORMAL);
          addch (' ');
        }
        else
@@ -232,6 +233,7 @@
 
         print_enriched_string (menu->color(i), (unsigned char *) buf, 1);
         SETCOLOR (MT_COLOR_NORMAL);          
+        BKGDSET (MT_COLOR_NORMAL);
       }
       else
       {