[darcs-devel] [issue1083] DARCS_DO_COLOR_LINES=True fights with \XX escape color

Trent Buck bugs at darcs.net
Fri Sep 19 14:50:44 UTC 2008


New submission from Trent Buck <trentbuck at gmail.com>:

I use

    export DARCS_DO_COLOR_LINES=True

In the example output of "darcs whatsnew" below, lines beginning with
a plus are cyan, and the escaped copyright symbols are red. But AFTER
the escape characters, the rest of the line is white; it should be
cyan.

Basically, after the escape a "reset colors" code is sent, which
resets both the red AND the cyan.  For this to behave properly, darcs
needs to remember internally a color "stack" and pop from it instead
of just sending the sgr0 code when popping to a non-empty stack.

    hunk ./debian/copyright 15
    +Files: debian/*
    +Copyright: \c2\a9 2003-2005, David Roundy <droundy at abridgegame.org>
    +Copyright: \c2\a9 2008, Trent W. Buck <trentbuck at gmail.com>
    +License: GPL-any
    + You are free to distribute this software under the terms of
    + the GNU General Public License.
    + On Debian systems, the complete text of the GNU General Public
    + License can be found in /usr/share/common-licenses/GPL file.

----------
messages: 6050
nosy: dagit, kowey, twb
status: unread
title: DARCS_DO_COLOR_LINES=True fights with \XX escape color

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1083>
__________________________________


More information about the darcs-devel mailing list