-
Notifications
You must be signed in to change notification settings - Fork 319
Closed
Labels
OutOfRangeIssues relating to System.ArgumentOutOfRangeExceptionIssues relating to System.ArgumentOutOfRangeException
Milestone
Description
There are some possible duplicates with same exception, but no one has the same reproduce steps with mine.
Environment data
PS version: 5.1.17763.316
PSReadline version: 2.0.0-beta2
os: 10.0.17763.1 (WinBuild.160101.0800)
PS file version: 10.0.17763.1 (WinBuild.160101.0800)
Steps to reproduce or exception report
cdinto a deep, long-named folder, e.g,~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup- resize the console so that the prompt occupies exactly one whole line (the cursor is at the second line), as the screenshot shows.

- press '
Exception throw:
PS C:\Users\Simon> cd "C:\Users\Simon\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
PS C:\Users\Simon\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup>
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 83 Keys:
c d Space " C : \ U s e r s \ S i m o n \ A p p D a t a \ R o a m i n g \ M i c r o s o f t \ W i n d o w s \ S t a r t Space M e n u \ P r o g r a m s \ S t a r t u p " Enter
'
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: left
Actual value was -2.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(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)
-----------------------------------------------------------------------
Metadata
Metadata
Assignees
Labels
OutOfRangeIssues relating to System.ArgumentOutOfRangeExceptionIssues relating to System.ArgumentOutOfRangeException