mirror of
https://github.com/PowerShell/PSReadLine
synced 2026-06-08 12:12:13 +00:00
Reset all attributes before changing color in rendering to avoid color leaking (#2925)
This commit is contained in:
@@ -177,7 +177,12 @@ namespace Microsoft.PowerShell
|
||||
{
|
||||
if (!object.ReferenceEquals(newColor, activeColor))
|
||||
{
|
||||
if (!inSelectedRegion) _consoleBufferLines[currentLogicalLine].Append(newColor);
|
||||
if (!inSelectedRegion)
|
||||
{
|
||||
_consoleBufferLines[currentLogicalLine]
|
||||
.Append(VTColorUtils.AnsiReset)
|
||||
.Append(newColor);
|
||||
}
|
||||
activeColor = newColor;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user