From 37ad1e2f6da31ba8bf09865fccddec61addaad24 Mon Sep 17 00:00:00 2001 From: nicm <nicm> Date: Sun, 12 Jan 2025 14:20:49 +0000 Subject: [PATCH] Map bright black (colour 8) to white (7) if the background is black on terminals with only eight colours so the text is not invisible. From Dmytro Bagrii in GitHub issue 4322. --- tty.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tty.c b/tty.c index f4676170..0080b7c6 100644 --- a/tty.c +++ b/tty.c @@ -2758,6 +2758,8 @@ tty_check_fg(struct tty *tty, struct colour_palette *palette, gc->fg &= 7; if (colours >= 16) gc->fg += 90; + else if (gc->fg == 0 && gc->bg == 0) + gc->fg = 7; } } return;