Skip to content

Commit 4e41223

Browse files
committed
Colors (Linux): only apply work around in Linux Console
1 parent 2ee4d7d commit 4e41223

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/modules/colors/colors.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ void ffPrintColors(FFColorsOptions* options)
5555
#ifdef __linux__
5656
// Required by Linux Console for light background to work
5757
if (options->symbol == FF_COLORS_SYMBOL_BACKGROUND)
58-
ffStrbufAppendS(&result, "\e[5m");
58+
{
59+
const char* term = getenv("TERM");
60+
if (term && ffStrEquals(term, "linux"))
61+
ffStrbufAppendS(&result, "\e[5m");
62+
}
5963
#endif
6064

6165
// 9%d: Set the foreground to the bright color

0 commit comments

Comments
 (0)