Prerequisites
Exception report
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less Parameter name: top
Actual value was -1.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defausHistory(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)
Screenshot
N/A
Environment data
PS Version: 5.1.19041.4291
PS HostName: ConsoleHost
PSReadLine Version: 2.0.0-beta2
PSReadLine EditMode: Windows
OS: 10.0.19041.1 (WinBuild.160101.0800)
BufferWidth: 93
BufferHeight: 15
Steps to reproduce
- Open Visual Studio Code.
- Open a new integrated terminal (e.g., PowerShell).
- Without typing anything, press the
UpArrow key to recall the previous command.
- Observe that the previous command appears, but an exception is thrown in the background.
Expected behavior
Pressing the UpArrow key in a new terminal should recall the previous command from history without throwing any exceptions.
Actual behavior
The previous command is successfully recalled and displayed, but an unhandled System.ArgumentOutOfRangeException is thrown:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less Parameter name: top
Actual value was -1.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
...
Prerequisites
Exception report
Screenshot
N/A
Environment data
Steps to reproduce
UpArrowkey to recall the previous command.Expected behavior
Pressing the
UpArrowkey in a new terminal should recall the previous command from history without throwing any exceptions.Actual behavior
The previous command is successfully recalled and displayed, but an unhandled
System.ArgumentOutOfRangeExceptionis thrown: