Detect initial bolding for console colors

This commit is contained in:
Mike Lorbetske 2017-06-14 23:51:02 -07:00
parent 451e9e62ec
commit 1a142953c2

View file

@ -8,11 +8,14 @@ namespace Microsoft.DotNet.Cli.Utils
{
public class AnsiConsole
{
private const int Light = 0x08;
private AnsiConsole(TextWriter writer)
{
Writer = writer;
OriginalForegroundColor = Console.ForegroundColor;
_boldRecursion = ((int)OriginalForegroundColor & Light) != 0 ? 1 : 0;
}
private int _boldRecursion;
@ -33,7 +36,6 @@ namespace Microsoft.DotNet.Cli.Utils
private void SetColor(ConsoleColor color)
{
const int Light = 0x08;
int c = (int)color;
Console.ForegroundColor =