From 526d37e4ac1529685eb5378368cc7a028eb6b330 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 25 Dec 2021 14:59:18 -0800 Subject: [PATCH] fix menu colors in all color schemes It looks like attron doesn't actually enable colors near 256, even though https://linux.die.net/man/3/attron suggests it does. > COLOR_PAIR values can only be OR'd with attributes if the pair > number is less than 256. --- src/teliva.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/teliva.c b/src/teliva.c index 9a6ec3e..c195211 100644 --- a/src/teliva.c +++ b/src/teliva.c @@ -32,7 +32,8 @@ void draw_menu_item(const char* key, const char* name) { } static void draw_menu(lua_State* L) { - attron(A_BOLD|A_REVERSE|COLOR_PAIR(COLOR_PAIR_MENU)); + attron(A_BOLD|A_REVERSE); + color_set(COLOR_PAIR_MENU, NULL); for (int x = 0; x < COLS; ++x) mvaddch(LINES-1, x, ' '); menu_column = 2;