Skip to content

ArgumentOutOfRangeException Running edited command #957

New issue

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

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

Already on GitHub? Sign in to your account

Closed
simonbuchan opened this issue Jul 4, 2019 · 1 comment
Closed

ArgumentOutOfRangeException Running edited command #957

simonbuchan opened this issue Jul 4, 2019 · 1 comment
Labels
OutOfRange Issues relating to System.ArgumentOutOfRangeException

Comments

@simonbuchan
Copy link

Looks very similar to #858, but value of top is positive, and it's when running an edited command, not pressing up.

Environment

PSReadLine: 2.0.0-beta4
PowerShell: 7.0.0-preview.1
OS: Microsoft Windows 10.0.18362
Last 200 Keys

 c s . Backspace Backspace Backspace e s . b i n Enter
 UpArrow UpArrow Enter
 UpArrow UpArrow Spacebar - - a c l / Backspace = p u b l i c - r e a d Enter
 UpArrow DownArrow DownArrow a w s Spacebar s 3 Spacebar r m Spacebar s 3 : / / s k i l i t i c s - v r - i s n Backspace Backspace n s t a l l e r / d u m b \ Spacebar t e s t Spacebar - - t r y Backspace Backspace Backspace Backspace Backspace Backspace . p n g Spacebar - - d r i n u Backspace Backspace Backspace y r u n Enter
 UpArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow Backspace RightArrow RightArrow RightArrow RightArrow RightArrow RightArrow RightArrow RightArrow RightArrow ' 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 ' 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: top
Actual value was 30.
   at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.AcceptLineImpl(Boolean validate)
   at Microsoft.PowerShell.PSConsoleReadLine.AcceptLine(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 or exception report

Ran aws s3 rm s3://skilitics-vr-installer/dumb\ test.png --dryrun, got an error, ran aws s3 rm 's3://skilitics-vr-installer/dumb test.png' --dryrun with up arrow and editing.
Re-running worked fine.

@daxian-dbw daxian-dbw added the OutOfRange Issues relating to System.ArgumentOutOfRangeException label Jul 16, 2019
@daxian-dbw
Copy link
Member

Fixed by #979

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

No branches or pull requests

2 participants