diff --git a/src/Microsoft.PowerShell.PSReadLine/Completion.cs b/src/Microsoft.PowerShell.PSReadLine/Completion.cs index f06ff520c..9dd13a6a6 100644 --- a/src/Microsoft.PowerShell.PSReadLine/Completion.cs +++ b/src/Microsoft.PowerShell.PSReadLine/Completion.cs @@ -308,8 +308,16 @@ namespace Microsoft.PowerShell for (int i = 0; i < menuColumnWidth; i++) { int j = i + start; +#if CORECLR + ConsoleColor tempColor = (int)buffer[j].ForegroundColor == -1 + ? ConsoleColor.White : buffer[j].ForegroundColor; + buffer[j].ForegroundColor = (int)buffer[j].BackgroundColor == -1 + ? ConsoleColor.Black : buffer[j].BackgroundColor; + buffer[j].BackgroundColor = tempColor; +#else buffer[j].ForegroundColor = (ConsoleColor)((int)buffer[j].ForegroundColor ^ 7); buffer[j].BackgroundColor = (ConsoleColor)((int)buffer[j].BackgroundColor ^ 7); +#endif } }