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