diff --git a/src/main.cc b/src/main.cc index d190fbe6..c09058f1 100644 --- a/src/main.cc +++ b/src/main.cc @@ -47,11 +47,14 @@ void set_color(Color fg_color, Color bg_color) { static std::map, int> colorpairs; static int current_pair = -1; - static int next_pair = 0; + static int next_pair = 1; if (current_pair != -1) attroff(COLOR_PAIR(current_pair)); + if (fg_color == Color::Default and bg_color == Color::Default) + return; + std::pair colorpair(fg_color, bg_color); auto it = colorpairs.find(colorpair); if (it != colorpairs.end())