-
Notifications
You must be signed in to change notification settings - Fork 322
Description
Environment data
PS version: 6.2.2
PSReadline version: 2.0.0-beta4
os: 10.0.18941.1001 (WinBuild.160101.0800) PS file version: 6.2.2.0
BufferWidth: 120
BufferHeight: 30
Steps to reproduce or exception report
PSReadline uses the Error color with -PromptText to change color to show a syntax error, however when this reverts, it seems to reset to default colors rather than restore the prompt as it was previously.
Expected Behavior
Ideal: PSReadline remembers what ANSI codes were used for the characters were that it replaced and respects them. This would probably be a regex of the prompt string to find the last relevant ANSI code combinations.
Less Ideal: PSReadline doesn't seem to remember ANSI codes if they are placed in PromptText. If it did, then the coloring expected for the prompt could be defined there and "replayed" when PSReadline reverts from the error coloring.
Least Ideal: PSReadline reverts the colors to a defined option such as DefaultTokenColor
