Prerequisites
Exception report
Screenshot
Pasting a simple function looks fine if the screen has not scrolled, but if it has scrolled, the closing } line shows up overlaid onto the last line of the function. (This could be a PSReadLine problem or a Windows Terminal problem.)
Unscrolled, showing the pasted text by MOREing it to temp.temp:
Scrolling by just standing on Enter, then doing the paste again:
Environment data
PS Version: 7.5.2
PS HostName: ConsoleHost
PSReadLine Version: 2.3.6
PSReadLine EditMode: Windows
OS: 10.0.26100.1 (WinBuild.160101.0800)
BufferWidth: 180
BufferHeight: 9001
Steps to reproduce
Just write a simple function starting with "function name {" and ending with "}" alone on a line, and paste it into PS
Expected behavior
The echoed-back function looks right
Actual behavior
If you paste it in an unscrolled window, it's right.
If you've scrolled down a bit and paste it, the last line ("}") is displayed atop the penultimate line.