Re: [PATCH v2 13/18] color: provide inverted colors, too
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 5, 2018, 22:03 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1805060001230.77@tvgsbejvaqbjf.bet>
- In-Reply-To
- <20180505182922.GD17700@sigill.intra.peff.net>
Hi Peff,
On Sat, 5 May 2018, Jeff King wrote:
Show 11 quoted lines
> On Fri, May 04, 2018 at 05:34:58PM +0200, Johannes Schindelin wrote: > > > For every regular color, there exists the inverted equivalent where > > background and foreground colors are exchanged. > > > > We will use this in the next commit to allow inverting *just* the +/- > > signs in a diff. > > There's a "reverse" attribute (which we already parse and support) that > can do this without having to repeat the colors. AFAIK it's well > supported everywhere, but I could be wrong.
How would I use that here, though? I need to get the thing via diff_get_color_opt() which takes a parameter of type `enum color_diff`. There is no way I can specify `reverse` here, can I?
> I wonder if that would make configuring this slightly more pleasant, > since it saves the user having to define "oldinv" whenever they change > "old".
I am all for making the configuration more pleasant. So I hope I can make use of the `reverse` thing here, without having to introduce a new enum value.
Ciao, Dscho