nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] bright colors without bold


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] bright colors without bold
Date: Sun, 28 Jan 2018 12:04:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0


Op 28-01-18 om 00:31 schreef Brand Huntsman:
If index is 8-15 it could subtract 8 and set bright flag to true. parse_color_names() could then re-add the 8 or A_BOLD it if only 8 colors.

Yes.

But any indices above 15 that are also greater than nr_term_colors should return -1 and cause the regex to be ignored.

Yes.

A bright attribute complicates the code because it can only work with color names. color_to_short() would need a third flag: bold flag is set for bright prefix, bright flag is set for 8-15 index colors and cname flag is set if a color name. Then parse_color_names() needs an attr_bright flag and must handle
four flags instead of two, and the mixture of error messages that could
occur.

Hrm...  So the idea is to support "bright" only as a prefix of the color name
(which makes sense, because it actually changes the color) and "bold" only as
an attribute?  Okay.  But then the meaning of the "bright" prefix has to change
to mean only bright and stop implying bold on terminal emulators.  That this
changes the effect of the included nanorcs, that is what I want.  And that it
changes also the effect of externally maintained nanorcs, that can't be helped.
If people want the old look back:  sed -i 's/bright/bold,bright/' *.nanorc

Benno



reply via email to

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