From 287fc13f8c7791deb1da63764939555360c6c45d Mon Sep 17 00:00:00 2001 From: magiblot Date: Sun, 11 Apr 2021 23:20:59 +0200 Subject: [PATCH] Always enable 16 colors with TERM=xterm See #52. --- source/platform/termdisp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/platform/termdisp.cpp b/source/platform/termdisp.cpp index 285ae3fa..63e1311e 100644 --- a/source/platform/termdisp.cpp +++ b/source/platform/termdisp.cpp @@ -37,6 +37,10 @@ TermCap TerminalDisplay::getCapabilities() termcap.quirks |= qfBoldIsBright; if (TermIO::isLinuxConsole()) termcap.quirks |= qfBlinkIsBright | qfNoItalic | qfNoUnderline; + else if (getEnv("TERM") == "xterm") + // Let's assume all terminals disguising themselves as 'xterm' + // support at least 16 colors. + termcap.colors = Indexed16; } } return termcap;