Repository navigation
System.ArgumentOutOfRangeException #1607
Copy link
Copy link
Closed
Labels
Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.There's another issue on the tracker that's pretty much the same thing.
Description
Environment
PS version: 5.1.19645.1
PSReadline version: 2.1.0-beta1
os: 10.0.19645.1 (WinBuild.160101.0800)
PS file version: 10.0.19645.1 (WinBuild.160101.0800)
HostName: ConsoleHost
BufferWidth: 267
BufferHeight: 3000
Exception report
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.md
Environment
PSReadLine: 2.1.0-beta1
PowerShell: 5.1.19645.1
OS: Microsoft Windows 10.0.19645
Last 200 Keys
- Ctrl+Spacebar a Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace u p d a Tab Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace u p d a t e 0 Backspace - m o d Tab Spacebar - Ctrl+Spacebar a Spacebar - Ctrl+Spacebar a Spacebar - Ctrl+Spacebar f Spacebar - Ctrl+Spacebar e RightArrow LeftArrow Spacebar Ctrl+Spacebar Spacebar LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow Spacebar - Ctrl+Spacebar DownArrow DownArrow DownArrow Spacebar - Ctrl+Spacebar DownArrow DownArrow Spacebar - f Ctrl+Spacebar Ctrl+Spacebar Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Ctrl+Spacebar RightArrow RightArrow Spacebar Ctrl+Spacebar Spacebar Enter
UpArrow LeftWindows LeftWindows Escape
Exception
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Text.StringBuilder.Remove(Int32 startIndex, Int32 length)
at Microsoft.PowerShell.PSConsoleReadLine.EditItemInsertChar.Undo()
at Microsoft.PowerShell.PSConsoleReadLine.RevertLine(Nullable`1 key, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(PSKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)
Steps to reproduce
I was just scrolling up looking at the results of commands I was testing for a script. The commands were nothing special just working with Invoke-RestMethod and Invoke-WebRequest.
Sorry, I don't have a better way to reproduce this issue.
Expected behavior
I guess for an error not to happen :-)
Actual behavior
I received the above error.
Metadata
Metadata
Assignees
Labels
Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.There's another issue on the tracker that's pretty much the same thing.
Activity
daxian-dbw commentedon Jun 16, 2020
The issue was fixed by #1496, and is included in
2.1.0-beta2version of PSReadLine, which is available in PowerShell Gallery. Please upgrade and give it a go.