Repository navigation
ArgumentOutOfRangeException - 2.1.0-beta1 #1599
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: 7.0.1
PSReadline version: 2.1.0-beta1
os: 10.0.18362.1 (WinBuild.160101.0800)
PS file version: 7.0.1.0
HostName: ConsoleHost (Windows Terminal)
BufferWidth: 120
BufferHeight: 50
Exception report
Environment
PSReadLine: 2.1.0-beta1
PowerShell: 7.0.1
OS: Microsoft Windows 10.0.18363
Last 200 Keys
\ s r Tab Backspace Backspace Backspace Backspace Backspace Spacebar . \ s r j Tab Backspace Tab RightArrow Enter
n p m Spacebar r u n Spacebar s t a r t Enter
c d Spacebar . . \ . . Enter
c d Spacebar . . \ . . Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace . UpArrow Enter
c d s Backspace Spacebar . \ RightArrow Enter
n p m Spacebar r u n Spacebar RightArrow Enter
c d Spacebar . . \ . . Enter
Enter
. UpArrow Enter
c d Spacebar . \ s r Tab RightArrow Enter
n p m RightArrow Enter
c d Spacebar . . RightArrow Enter
. \ RightArrow Enter
c d Spacebar s r Tab RightArrow Enter
n p m Spacebar r u n Spacebar RightArrow Enter
c d Spacebar . . Enter
. Backspace c d Spacebar . . Enter
. \ RightArrow Enter
c d Spacebar . . Backspace Backspace . \ s r RightArrow Enter
n p RightArrow Enter
c d Spacebar . . Enter
. . Enter
c d Spacebar . . Enter
UpArrow UpArrow UpArrow UpArrow Backspace Backspace Ctrl+Backspace Backspace Enter
UpArrow Escape
Exception
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Text.StringBuilder.Insert(Int32 index, String value)
at Microsoft.PowerShell.PSConsoleReadLine.EditItemDelete.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 had hit Esc and this happened.
Expected behavior
No error.
Actual behavior
It errored.
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 10, 2020
This is a duplicate of #1495. It was fixed by #1496, and is included in
2.1.0-beta2version of PSReadLine.Please upgrade to
2.1.0-beta2and give it a go.