You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to PowerShell Core 6.2.1, I've noticed an issue with how PSReadLine handles multiline entry in both Windows PowerShell 5.1 and PowerShell Core 6. When entering a long multi-line entry in a here-string, PSReadLine scrolls to the first line of the prompt and then scrolls to the end on each keypress. On very long entries, this can take extremely long to scroll between each keypress.
I'm unsure how to update either of these; I don't see that beta4 has a binary release. I'm not able to install Powershell Core 7 preview, unfortunately, so I cannot test that. Major version increments have to be approved even for testing on my systems.
Steps to reproduce or exception report
First, create a long multiline string.
On PowerShell 5:
# Set a long multiline string1..1000|Set-Clipboard
On PowerShell Core 6 with the ClipboardText module:
# Set a long multiline string1..1000|Set-ClipboardText
In reality, this list of values or long string would come from outside of Powershell entirely; this is just a convenient analog.
Now, start writing a command with a here-string command and paste the text from your clipboard. Powershell will scroll to the end of the entry.
Now, try closing the here-string and piping it to a command:
>>998>>999>>1000>>'@ | Get-Random -Count 25
Every time you press a key, Powershell will jump back up 1000 lines and scroll the output back down. If you start typing normally, you can't even read the screen because it's scrolling so wildly. Arrow keys work normally, but selecting text with arrow keys causes the scrolling issue again.
The only workaround I've found is to disable PSReadLine with Remove-Module PSReadline. I don't remember this happenning with PSReadLine 1.2.
The text was updated successfully, but these errors were encountered:
To clarify, this scrolling issue happens on any long multi-line entry, it's just easiest to reproduce with a long here-string. A long list of values separated by a comma and a line break, or a really long ForEach-Object script block would experience the same scrolling problem.
After updating to PowerShell Core 6.2.1, I've noticed an issue with how PSReadLine handles multiline entry in both Windows PowerShell 5.1 and PowerShell Core 6. When entering a long multi-line entry in a here-string, PSReadLine scrolls to the first line of the prompt and then scrolls to the end on each keypress. On very long entries, this can take extremely long to scroll between each keypress.
Environment data
I'm unsure how to update either of these; I don't see that beta4 has a binary release. I'm not able to install Powershell Core 7 preview, unfortunately, so I cannot test that. Major version increments have to be approved even for testing on my systems.
Steps to reproduce or exception report
First, create a long multiline string.
On PowerShell 5:
On PowerShell Core 6 with the ClipboardText module:
In reality, this list of values or long string would come from outside of Powershell entirely; this is just a convenient analog.
Now, start writing a command with a here-string command and paste the text from your clipboard. Powershell will scroll to the end of the entry.
That's all fine.
Now, try closing the here-string and piping it to a command:
Every time you press a key, Powershell will jump back up 1000 lines and scroll the output back down. If you start typing normally, you can't even read the screen because it's scrolling so wildly. Arrow keys work normally, but selecting text with arrow keys causes the scrolling issue again.
The only workaround I've found is to disable PSReadLine with
Remove-Module PSReadline
. I don't remember this happenning with PSReadLine 1.2.The text was updated successfully, but these errors were encountered: