-
Notifications
You must be signed in to change notification settings - Fork 316
Closed
Labels
Needs-ReproThere is no sufficient information on repro steps.There is no sufficient information on repro steps.
Description
Environment
PS version: 7.1.2
PSReadline version:
os: 10.0.19041.860 (WinBuild.160101.0800)
PS file version: 7.1.2.0
HostName: ConsoleHost (Windows Terminal)
BufferWidth: 110
BufferHeight: 35
Steps to reproduce
Have a prompt that spans for two lines, like:
bruno@computer in ~
❯
I've tested this on my home directory, where there are enough items for Get-ChildItem
output to be vertically bigger than the Terminal's line count.
bruno@computer in ~
❯ Get-ChildItem
# Output
bruno@computer in ~
❯ Get-ChildItem
# Output
bruno@computer in ~
❯ Clear-Host
Expected behavior
Prompt is written to console and there is no scroll bar, like this:
Actual behavior
After two or three Get-ChildItem
's (there's no exact count, except that it must be more than 1 time in a row), Clear-Host
will add an extra empty line before writing the prompt to console. The cursor position, though, will be on the correct location, meaning that Windows Terminal will display a scrollbar so you can go one line up.
If you drag the scrollbar to the top, this is shown:
- I've tested disabling PSReadLine on current session by running
Remove-Module PSReadLine
and everything started to work as expected. - Tested with ConHost, but could not reproduce the error there.
- Tried calling
Set-PSReadLineOption -ExtraPromptLineCount 1
, with no effect whatsoever on console output
Metadata
Metadata
Assignees
Labels
Needs-ReproThere is no sufficient information on repro steps.There is no sufficient information on repro steps.