about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ui.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui.c b/ui.c
index 12205cc..894e04d 100644
--- a/ui.c
+++ b/ui.c
@@ -135,12 +135,14 @@ static attr_t colorAttr(short fg) {
 
 static short colorPair(short fg, short bg) {
 	if (bg == -1) return 1 + fg;
+	fg %= COLORS;
+	bg %= COLORS;
 	for (short pair = 17; pair < colorPairs; ++pair) {
 		short f, b;
 		pair_content(pair, &f, &b);
 		if (f == fg && b == bg) return pair;
 	}
-	init_pair(colorPairs, fg % COLORS, bg % COLORS);
+	init_pair(colorPairs, fg, bg);
 	return colorPairs++;
 }
 
66c31f92f4b482c49a8fbd2dd3c9282e&follow=1'>Update catsit to 1.1June McEnroe 2020-12-15Update pounce to 2.1p1June McEnroe 2020-12-15Add imbox portJune McEnroe 2020-11-24Update pounce to 2.1June McEnroe 2020-11-24Update libretls to 3.3.0June McEnroe 2020-11-17Update catgirl to 1.3June McEnroe 2020-11-17Update libretls to 3.2.2June McEnroe 2020-09-29Update libretls to 3.2.1June McEnroe 2020-09-10Update catgirl to 1.2June McEnroe 2020-09-09Add pounce-palaver portJune McEnroe 2020-09-09Update pounce to 2.0June McEnroe 2020-09-09Update litterbox to 1.6June McEnroe 2020-08-23Add scooper portJune McEnroe 2020-08-23Add catsit portJune McEnroe 2020-08-13Update pounce to 1.4p2June McEnroe 2020-08-11Update pounce to 1.4p1June McEnroe 2020-08-10Add litterbox portJune McEnroe 2020-08-10Add missing USES=pkgconfig to pounceJune McEnroe