|
1 | | -const char *colorname[] = {{ |
| 1 | +static const char *colorname[] = { |
| 2 | + /* 8 normal colors */ |
| 3 | + "{color0}", |
| 4 | + "{color1}", |
| 5 | + "{color2}", |
| 6 | + "{color3}", |
| 7 | + "{color4}", |
| 8 | + "{color5}", |
| 9 | + "{color6}", |
| 10 | + "{color7}", |
2 | 11 |
|
3 | | - /* 8 normal colors */ |
4 | | - [0] = "{color0}", /* black */ |
5 | | - [1] = "{color1}", /* red */ |
6 | | - [2] = "{color2}", /* green */ |
7 | | - [3] = "{color3}", /* yellow */ |
8 | | - [4] = "{color4}", /* blue */ |
9 | | - [5] = "{color5}", /* magenta */ |
10 | | - [6] = "{color6}", /* cyan */ |
11 | | - [7] = "{color7}", /* white */ |
| 12 | + /* 8 bright colors */ |
| 13 | + "{color8}", |
| 14 | + "{color9}", |
| 15 | + "{color10}", |
| 16 | + "{color11}", |
| 17 | + "{color12}", |
| 18 | + "{color13}", |
| 19 | + "{color14}", |
| 20 | + "{color15}", |
12 | 21 |
|
13 | | - /* 8 bright colors */ |
14 | | - [8] = "{color8}", /* black */ |
15 | | - [9] = "{color9}", /* red */ |
16 | | - [10] = "{color10}", /* green */ |
17 | | - [11] = "{color11}", /* yellow */ |
18 | | - [12] = "{color12}", /* blue */ |
19 | | - [13] = "{color13}", /* magenta */ |
20 | | - [14] = "{color14}", /* cyan */ |
21 | | - [15] = "{color15}", /* white */ |
| 22 | + [255] = 0, |
22 | 23 |
|
23 | | - /* special colors */ |
24 | | - [256] = "{background}", /* background */ |
25 | | - [257] = "{foreground}", /* foreground */ |
26 | | - [258] = "{cursor}", /* cursor */ |
27 | | -}}; |
| 24 | + /* more colors can be added after 255 to use with DefaultXX */ |
| 25 | + "{background}", |
| 26 | + "{foreground}", |
| 27 | + "{cursor}", |
| 28 | +}; |
28 | 29 |
|
29 | | -/* Default colors (colorname index) |
30 | | - * foreground, background, cursor */ |
31 | | - unsigned int defaultbg = 0; |
32 | | - unsigned int defaultfg = 257; |
33 | | - unsigned int defaultcs = 258; |
34 | | - unsigned int defaultrcs= 258; |
| 30 | + |
| 31 | +/* |
| 32 | + * Default colors (colorname index) |
| 33 | + * foreground, background, cursor, reverse cursor |
| 34 | + */ |
| 35 | +unsigned int defaultfg = 257; |
| 36 | +unsigned int defaultbg = 256; |
| 37 | +static unsigned int defaultcs = 258; |
| 38 | +static unsigned int defaultrcs = 258; |
0 commit comments