From d6a994dc61327fad0a614ce09bfeafab0482ab51 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Tue, 22 Aug 2017 08:34:39 -0700 Subject: [PATCH] Use raw console bgcolor by default in IHostOutput.WriteOutput This change resolves PowerShell/vscode-powershell#637 which reports that on Linux and macOS the input prompt is printed out with a black background, overriding the console's default background color. The fix is to use a System.ConsoleColor of -1 as the default rather than System.ConsoleColor.Black so that .NET's console library will not override the console's background color. --- src/PowerShellEditorServices/Session/Host/IHostOutput.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PowerShellEditorServices/Session/Host/IHostOutput.cs b/src/PowerShellEditorServices/Session/Host/IHostOutput.cs index 31389043d..4f36bc54f 100644 --- a/src/PowerShellEditorServices/Session/Host/IHostOutput.cs +++ b/src/PowerShellEditorServices/Session/Host/IHostOutput.cs @@ -135,7 +135,7 @@ public static void WriteOutput( includeNewLine, outputType, ConsoleColor.Gray, - ConsoleColor.Black); + (ConsoleColor)(-1)); // -1 indicates the console's raw background color } /// @@ -169,7 +169,7 @@ public static void WriteOutput( includeNewLine, outputType, foregroundColor, - ConsoleColor.Black); + (ConsoleColor)(-1)); // -1 indicates the console's raw background color } } }