-
Notifications
You must be signed in to change notification settings - Fork 318
Closed
Labels
Milestone
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues, especially the pinned issues.
Exception report
No exception, but the rendering is incorrect.Screenshot
As is shown in the GIF below, the cursor position is off when the dynamic help rendering needs buffer scroll-up.
This is because when it comes to adjust the cursor position, the code doesn't take into account the extra physical lines introduced by multi-line text.
Environment data
PS Version: 7.1.3
PS HostName: ConsoleHost (Windows Terminal)
PSReadLine Version: 2.2.0-beta4
PSReadLine EditMode: Windows
OS: 10.0.19041.1 (WinBuild.160101.0800)
BufferWidth: 133
BufferHeight: 30Steps to reproduce
- Type a number of Enter to move the prompt to the last line of the screen buffer.
- Copy
get-Command -Nameto the line - Press Alt+h to trigger the dynamic in-line help
- Press any key to clear the content, and then press Alt+h again.
You will see the cursor position becomes incorrect.
Expected behavior
Cursor position should be at the end of get-Command -Name
Actual behavior
Cursor position becomes incorrect.
