[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: |
Fri, 9 Feb 2018 11:31:33 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Op 08-02-18 om 03:04 schreef Brand Huntsman:
init_pair(i + 1, combo->fg, combo->bg);
- interface_color_pair[i] = COLOR_PAIR(i + 1) | A_BANDAID
|
-
(combo->bright ? A_BOLD : A_NORMAL);
+ interface_color_pair[i] = COLOR_PAIR(i + 1)
+ |
combo->attributes
+
| A_BANDAID;
You still change a line that doesn't need to be changed.
if (strncasecmp(colorname, "bright", 6) == 0) {
+ /* The bright foreground prefix makes the color bright without
+ * bolding it. It bolds on terminals with only 8 colors. */
The second sentence isn't true.
+ if (fg_bright) {
+ if (*attributes & A_BOLD)
+ rcfile_error(N_("A foreground color should
not be bright with bold attribute"));
There is no need to complain about this. When specifying "bold", adding
"bright" is superfluous, but not an error. Personally, I want to specify
"bold,brightcyan" (for example), so that the words actually describe what
the color will look like on my usual terminal.
+ /* It is possible to have a bright background by adding
8 to it.
+ * But "red,brightred" becomes "red,red" on 8-color.
+ * Use "reverse,brightred,red" for a similar result. */
Misplaced comment.
-icolor yellow
"^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
+icolor yellow
"^[[:space:]]*i?color[[:space:]]+(bold|(bold,)*((bright)?(white|black|red|blue|green|yellow|magenta|cyan))?(,(white|black|red|blue|green|yellow|magenta|cyan))?)\>"
The "(bold,)*" should be "(bold,)?".
Amended patches are coming up.
Benno