Skip to content
New issue

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

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

Already on GitHub? # to your account

Up arrow to get to the last command (in a new window) throws exception. #844

Closed
corthon opened this issue Jan 9, 2019 · 2 comments
Closed
Labels
OutOfRange Issues relating to System.ArgumentOutOfRangeException

Comments

@corthon
Copy link

corthon commented Jan 9, 2019

From the dump...
Last 2 Keys:
` UpArrow

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 -1.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.HistoryRecall(Int32 direction)
at Microsoft.PowerShell.PSConsoleReadLine.PreviousHistory(Nullable1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

Environment data

PS version: 5.1.18312.1001
PSReadline version: 2.0.0-beta2
os: 10.0.18312.1001 (WinBuild.160101.0800)
PS file version: 10.0.18312.1001 (WinBuild.160101.0800)

Steps to reproduce or exception report

Open new admin PS.
Snap to bottom-left of screen.
Hit up arrow.
Exception.

Repro'ed three times in a row, but can't seem to repro again.

@DaneelTrevize
Copy link

DaneelTrevize commented Jan 26, 2019

I just encountered the same exception, but a slightly different reproduction steps:

Open new regular PS.
Resize the window to a smaller size.
Hit up arrow.
Exception.

Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 1 Keys:
 UpArrow

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 -1.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.HistoryRecall(Int32 direction)
   at Microsoft.PowerShell.PSConsoleReadLine.PreviousHistory(Nullable`1 key, Object arg)
   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)

@daxian-dbw daxian-dbw added this to the 2.0.0-Consider milestone Jun 18, 2019
@joeyaiello joeyaiello added the OutOfRange Issues relating to System.ArgumentOutOfRangeException label Jun 18, 2019
@daxian-dbw
Copy link
Member

Fixed by #979 and #967

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
OutOfRange Issues relating to System.ArgumentOutOfRangeException
Projects
None yet
Development

No branches or pull requests

4 participants