nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] [PATCH] extended color support


From: Brand Huntsman
Subject: Re: [Nano-devel] [PATCH] extended color support
Date: Sat, 27 Jan 2018 04:43:45 -0700

On Sat, 27 Jan 2018 12:07:28 +0100
Benno Schulenberg <address@hidden> wrote:

> Why?  This is not needed to get extra colors.  Don't add stuff that
> is not necessary in order to implement extra colors.  Plus: I hate
> underline, and I hate reverse in normal text, and my terminal can't
> do italic, so all those extra attributes are useless to me.

The bold attribute was needed and the others are practically free. They
don't need to be used in default syntaxes but would be very useful for
anyone who wants to use them in custom syntaxes.

http://lists.gnu.org/archive/html/nano-devel/2017-10/msg00108.html

I forgot to mention this before, but the changes made by the attribute patch 
also allow for 'color , "regex"' which uses default fg/bg colors, which might 
be a 17th color. And attributes with no fg/bg apply to the default fg/bg colors.


> -           const colortype *beforenow = sint->color;
> +           const colortype *prev = sint->color;
> 
> Why rename this?

The old name was too long and prevented the code from fitting in 80 columns.


> Also, keep the style that nano uses: operators are place at the end
> of continued lines, not at the beginning.

How would you format that code to make it readable and not exceed 80 columns?


> -       *bright = TRUE;
> +       *bold = TRUE;
> 
> Another rename!

The bright prefix and bold attribute do the same thing, they set the A_BOLD 
attribute. The new variable name is exactly what should happen.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]