forked from aniani/vim
patch 7.4.1036
Problem: Only terminals with up to 256 colors work properly. Solution: Use the 256 color behavior for all terminals with 256 or more colors. (Robert de Bath, closes #504)
This commit is contained in:
17
src/syntax.c
17
src/syntax.c
@@ -7700,7 +7700,7 @@ do_highlight(line, forceit, init)
|
|||||||
color &= 7; /* truncate to 8 colors */
|
color &= 7; /* truncate to 8 colors */
|
||||||
}
|
}
|
||||||
else if (t_colors == 16 || t_colors == 88
|
else if (t_colors == 16 || t_colors == 88
|
||||||
|| t_colors == 256)
|
|| t_colors >= 256)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Guess: if the termcap entry ends in 'm', it is
|
* Guess: if the termcap entry ends in 'm', it is
|
||||||
@@ -7711,18 +7711,15 @@ do_highlight(line, forceit, init)
|
|||||||
p = T_CAF;
|
p = T_CAF;
|
||||||
else
|
else
|
||||||
p = T_CSF;
|
p = T_CSF;
|
||||||
if (*p != NUL && *(p + STRLEN(p) - 1) == 'm')
|
if (*p != NUL && (t_colors > 256
|
||||||
switch (t_colors)
|
|| *(p + STRLEN(p) - 1) == 'm'))
|
||||||
{
|
{
|
||||||
case 16:
|
if (t_colors == 88)
|
||||||
color = color_numbers_8[i];
|
|
||||||
break;
|
|
||||||
case 88:
|
|
||||||
color = color_numbers_88[i];
|
color = color_numbers_88[i];
|
||||||
break;
|
else if (t_colors >= 256)
|
||||||
case 256:
|
|
||||||
color = color_numbers_256[i];
|
color = color_numbers_256[i];
|
||||||
break;
|
else
|
||||||
|
color = color_numbers_8[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -741,6 +741,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 */
|
||||||
|
/**/
|
||||||
|
1036,
|
||||||
/**/
|
/**/
|
||||||
1035,
|
1035,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user