[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mutt-dev
Subject:    Re: Coloring full line in header
From:       Thomas Dickey <dickey () herndon4 ! his ! com>
Date:       2002-09-26 23:40:05
[Download RAW message or body]

On Wed, Sep 25, 2002 at 05:56:48PM -0700, Michael Elkins wrote:
> Thomas Dickey wrote:
> > mutt does - but there are some missing pieces.  The calls using the macro
> > BKGDSET are either incomplete, or there is needed some related calls to the
> > bkgd function.
> > 
> > 	#if !defined(USE_SLANG_CURSES) && defined(HAVE_BKGDSET)
> > 	#define BKGDSET(x) bkgdset (ColorDefs[x] | ' ')
> > 	#else
> > 	#define BKGDSET(x)
> > 	#endif
> 
> I've re-read the bkgdset() man page and I don't understand what is
> missing here.  There is no mention of "related" calls.  The bkgd() call
> seems to set the background of the entire screen, not just the region we
> are interseted in.
> 
> What is supposed to happen when there is a different background color
> for the header than for the body of the message?  Shouldn't a bkgdset()
> + clrtoeol() suffice to fill the blank spaces at the end of a line?

For example - it takes time to investigate this stuff - but I can see some
issues by turning on ncurses' trace and matching it against identifiable
spots in mutt.  I'm looking at the thread-tree, where slang is filling
the area between vertical lines, and ncurses does not.  That is because
the two interpret
	addch(' ');
differently.  Slang is seeing that blank as foreground text, and using the
foreground color (magenta on my machine).  But the background color is default
(black).  ncurses treats the blank differently from text - which is what X/Open
curses says.  Further, the text color shown by slang is black - the background
color.

One can duplicate slang's effect by applying the foreground color with bkgdset
but perhaps not in the instance I'm looking at, since I would regard it as a
bug.

-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic