If only 8 colors are available, map the rest of 256 to base ones
This commit is contained in:
@@ -217,9 +217,9 @@ int Color::pairNumber() const
|
|||||||
else if (!isDefault())
|
else if (!isDefault())
|
||||||
{
|
{
|
||||||
if (!previousBackground())
|
if (!previousBackground())
|
||||||
result = background() + 1;
|
result = (background() + 1) % COLORS;
|
||||||
result *= 256;
|
result *= 256;
|
||||||
result += foreground();
|
result += foreground() % COLORS;
|
||||||
|
|
||||||
assert(result < int(color_pair_map.size()));
|
assert(result < int(color_pair_map.size()));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user