-
Notifications
You must be signed in to change notification settings - Fork 316
Closed
Milestone
Description
The cursor randomly jumps around if you resize your pwsh console. This is happening on Linux VM, cloudshell or Windows.
Initial Investigation
The issue seems to come from here https://github.com/lzybkr/PSReadLine/blob/master/PSReadLine/Render.cs#L636. RecomputeInitailCoords() checks BufferWidth only. I am not sure the original design intent. However If I add BufferHeight in the RenderData class and check the BufferWidth in the RecomputeInitailCoords(). The problem goes away.
Steps to reproduce
-
Linux VM or CloudShell bash + pwsh
-
ls -la
-
If you make the console smaller, you will see a large space added before the current line
-
make the console bigger, you will see your cursor jump in the middle of the console.
Expected behavior
The cursor should remain the same position as pre-resizing.
Actual behavior
See above.
Environment data
Name Value
---- -----
PSVersion 6.1.0-preview.1
PSEdition Core
GitCommitId v6.1.0-preview.1
OS Linux 4.4.0-121-generic #145-Ubuntu SMP Fri Apr 13 13:47:23 UTC 2018
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
cc @SteveL-MSFT
Metadata
Metadata
Assignees
Labels
No labels