Skip to content

Commit b536aff

Browse files
committed
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.
1 parent 1a732c8 commit b536aff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PowerShellEditorServices/Session/Host/IHostOutput.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public static void WriteOutput(
135135
includeNewLine,
136136
outputType,
137137
ConsoleColor.Gray,
138-
ConsoleColor.Black);
138+
(ConsoleColor)(-1)); // -1 indicates the console's raw background color
139139
}
140140

141141
/// <summary>
@@ -169,7 +169,7 @@ public static void WriteOutput(
169169
includeNewLine,
170170
outputType,
171171
foregroundColor,
172-
ConsoleColor.Black);
172+
(ConsoleColor)(-1)); // -1 indicates the console's raw background color
173173
}
174174
}
175175
}

0 commit comments

Comments
 (0)