Enable colourized output while in debugger

This commit is contained in:
Martin Hořeňovský 2017-05-22 00:41:31 +02:00
parent 67914d8b86
commit 169e260e8b

View File

@ -94,9 +94,7 @@ namespace {
? config->useColour() ? config->useColour()
: UseColour::Auto; : UseColour::Auto;
if( colourMode == UseColour::Auto ) if( colourMode == UseColour::Auto )
colourMode = !isDebuggerActive() colourMode = UseColour::Yes;
? UseColour::Yes
: UseColour::No;
return colourMode == UseColour::Yes return colourMode == UseColour::Yes
? &s_instance ? &s_instance
: NoColourImpl::instance(); : NoColourImpl::instance();
@ -155,7 +153,7 @@ namespace {
? config->useColour() ? config->useColour()
: UseColour::Auto; : UseColour::Auto;
if( colourMode == UseColour::Auto ) if( colourMode == UseColour::Auto )
colourMode = (!isDebuggerActive() && isatty(STDOUT_FILENO) ) colourMode = isatty(STDOUT_FILENO)
? UseColour::Yes ? UseColour::Yes
: UseColour::No; : UseColour::No;
return colourMode == UseColour::Yes return colourMode == UseColour::Yes