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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user