Colors (Linux): only apply work around in Linux Console

This commit is contained in:
李通洲
2024-08-14 10:03:12 +08:00
parent 2ee4d7daac
commit 4e41223b81
+5 -1
View File
@@ -55,7 +55,11 @@ void ffPrintColors(FFColorsOptions* options)
#ifdef __linux__
// Required by Linux Console for light background to work
if (options->symbol == FF_COLORS_SYMBOL_BACKGROUND)
ffStrbufAppendS(&result, "\e[5m");
{
const char* term = getenv("TERM");
if (term && ffStrEquals(term, "linux"))
ffStrbufAppendS(&result, "\e[5m");
}
#endif
// 9%d: Set the foreground to the bright color