mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.1.1146: in MS-Windows console colors in a terminal window are wrong
Problem: In MS-Windows console colors in a terminal window are wrong. Solution: Use the ansi index also for 16 colors. (Ken Takata)
This commit is contained in:
parent
a7be0f2451
commit
ef8c83c550
@ -2433,8 +2433,8 @@ color2index(VTermColor *color, int fg, int *boldp)
|
|||||||
if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
|
if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
|
||||||
{
|
{
|
||||||
/* First 16 colors and default: use the ANSI index, because these
|
/* First 16 colors and default: use the ANSI index, because these
|
||||||
* colors can be redefined. */
|
* colors can be redefined, we use the RGB values. */
|
||||||
if (t_colors >= 16)
|
if (t_colors > 256)
|
||||||
return color->ansi_index;
|
return color->ansi_index;
|
||||||
switch (color->ansi_index)
|
switch (color->ansi_index)
|
||||||
{
|
{
|
||||||
@ -3604,6 +3604,7 @@ set_vterm_palette(VTerm *vterm, long_u *rgb)
|
|||||||
for (; index < 16; index++)
|
for (; index < 16; index++)
|
||||||
{
|
{
|
||||||
VTermColor color;
|
VTermColor color;
|
||||||
|
|
||||||
color.red = (unsigned)(rgb[index] >> 16);
|
color.red = (unsigned)(rgb[index] >> 16);
|
||||||
color.green = (unsigned)(rgb[index] >> 8) & 255;
|
color.green = (unsigned)(rgb[index] >> 8) & 255;
|
||||||
color.blue = (unsigned)rgb[index] & 255;
|
color.blue = (unsigned)rgb[index] & 255;
|
||||||
|
@ -771,6 +771,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1146,
|
||||||
/**/
|
/**/
|
||||||
1145,
|
1145,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user