Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when pressing CTRL + L #2691

Closed
danielvieiravega opened this issue Jul 20, 2021 · 1 comment
Closed

Exception when pressing CTRL + L #2691

danielvieiravega opened this issue Jul 20, 2021 · 1 comment

Comments

@danielvieiravega
Copy link

Environment

PS version: 5.1.19041.1023
PSReadline version: 2.0.0-beta2
os: 10.0.19041.320 (WinBuild.160101.0800)
PS file version: 10.0.19041.320 (WinBuild.160101.0800)
HostName: ConsoleHost (Windows Terminal)
BufferWidth: 183
BufferHeight: 50

Exception report

Last 200 Keys:
x d Ctrl+c Ctrl+r - a x Backspace f Backspace x Backspace z Backspace Ctrl+c Ctrl+r a x f d Backspace Backspace Backspace f d Backspace Backspace Backspace Ctrl+c Ctrl+c Ctrl+c Ctrl+c g i t Space c l e a n Space - f x d Enter
g i t Space s t a t u s Enter
b u i l d Tab Enter
b u i l d Tab Enter
b u i l Tab Enter
UpArrow Enter
b u i l d Tab Enter
UpArrow Enter
b u i l d Tab Enter
UpArrow Enter
b u i Tab Enter
b u i l d Tab Enter
b u i l d Tab Enter
b u i l d Tab Enter
b u i l Tab Enter
b u i l d Tab Enter
UpArrow UpArrow DownArrow Enter
Enter
n o d e Space - v Enter
d o c k e r Space p s Enter
d o c k e r Space c o m c p o s e Space p s Enter
d o c k e r Space c o m p o s e Space p s Enter
Ctrl+l

Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: top
Actual value was -35.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

Steps to reproduce

Sometimes when trying to clean the screen, pressing CTRL + L.

Expected behavior

The screen cleaned and the cursor in the first line of PowerShell

Actual behavior

The exception is displayed in PowerShell asking to open a PR here. It happens sometimes, so it is hard to force the reproduction.

@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Jul 20, 2021
@daxian-dbw
Copy link
Member

This issue was already fixed (see #1315). Please upgrade to the 2.1.0 version of PSReadLine from PowerShell Gallery.
See the upgrading section for instructions. Please let us know if you run into the same issue with the latest version.

@ghost ghost removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants