1
0
forked from aniani/vim

patch 8.1.1161: unreachable code

Problem:    Unreachable code.
Solution:   Remove condition that will never be true.  Add tests for all ANSI
            colors.
This commit is contained in:
Bram Moolenaar
2019-04-12 22:27:39 +02:00
parent c8b3ddab51
commit 1d79ce81e7
4 changed files with 64 additions and 4 deletions

View File

@@ -2432,10 +2432,7 @@ color2index(VTermColor *color, int fg, int *boldp)
if (color->ansi_index != VTERM_ANSI_INDEX_NONE)
{
/* First 16 colors and default: use the ANSI index, because these
* colors can be redefined, we use the RGB values. */
if (t_colors > 256)
return color->ansi_index;
// The first 16 colors and default: use the ANSI index.
switch (color->ansi_index)
{
case 0: return 0;