summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-09-14 14:47:37 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-09-14 14:47:37 +0100
commitfd0567c730d1f7b70c30e7cce6e8d6ae64a5a8ab (patch)
treefa4b016a94dd3039065da37e086414539856e14d /src
parenta4804afa4218c6418913c09dd58fa52ff72c0505 (diff)
Do not touch the first 16 colors in ncurses UI
Diffstat (limited to 'src')
-rw-r--r--src/ncurses_ui.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ncurses_ui.cc b/src/ncurses_ui.cc
index 9245b015..81adf298 100644
--- a/src/ncurses_ui.cc
+++ b/src/ncurses_ui.cc
@@ -140,7 +140,7 @@ constexpr struct { unsigned char r, g, b; } builtin_colors[] = {
static void restore_colors()
{
- for (size_t i = 8; i < COLORS; ++i)
+ for (size_t i = 16; i < COLORS; ++i)
{
auto& c = builtin_colors[i];
init_color(i, c.r * 1000 / 255, c.g * 1000 / 255, c.b * 1000 / 255);
@@ -160,16 +160,16 @@ static int nc_color(Color color)
{ Color::Cyan, COLOR_CYAN },
{ Color::White, COLOR_WHITE },
};
- static int next_color = 8;
+ static int next_color = 16;
auto it = colors.find(color);
if (it != colors.end())
return it->second;
- else if (can_change_color() and COLORS > 8)
+ else if (can_change_color() and COLORS > 16)
{
kak_assert(color.color == Color::RGB);
if (next_color > COLORS)
- next_color = 8;
+ next_color = 16;
init_color(next_color,
color.r * 1000 / 255,
color.g * 1000 / 255,