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
{{ message }}
Repository navigation
Cursor does not seem to be on the right position after resizing #682
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
Activity
Fixed cursor position after resize (#694)