Closed totkeks closed 8 months ago
@totkeks I can reproduce this, but on validating our configuration for this, everything seems correct. My hunch is that PowerShell can't handle this functionality in a multiline setup, it replaces part of the prompt on the previous line (which it shouldn't do). As we don't control that part, please check in with the PowerShell team so they can solve this.
I passed this on to the PowerShell team (https://github.com/PowerShell/PowerShell/issues/21363) but they were pretty quick in providing a counter example.
Are you sure it is not related to OMP? I might have to try their example again with those unicode characters, maybe that plays a role.
@totkeks it sets the following based on your configuration:
When I adjust the configuration to this:
[valid_line]
background = "transparent"
foreground = "green"
template = "v "
[error_line]
background = "transparent"
foreground = "red"
template = "x "
Nothing is an issue, it works as designed. My assumption is that the "special" characters cause this, PSReadline doesn't seem to handle these correctly (probably calculates the width incorrectly).
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.
Code of Conduct
What happened?
When the effect of
error line
triggers, e.g. when starting to type the worddotnet
, the whole line is shifted to the left by one character, making the actual first letter appear at the end of the previous line.When clearing the error state, e.g. by removing the input, the
valid line
is also shifted to the left by one character. Additionally, there is also one character remaining of the previous input. In the screenshot below that is thed
, which is only visible, but not part of the current line / input, because it is actually the empty string.The font I'm using is Cascadia Code NerdFont aka Caskaydia Cove and the default prompt works just fine with those lines.
The error also appears in both Windows Terminal and the VSCode Terminal.
Theme
My own theme.
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output