Skip to content

System.ArgumentOutOfRangeException throw when press quote key #919

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
yume-chan opened this issue May 16, 2019 · 0 comments · Fixed by #967
Closed

System.ArgumentOutOfRangeException throw when press quote key #919

yume-chan opened this issue May 16, 2019 · 0 comments · Fixed by #967
Labels
OutOfRange Issues relating to System.ArgumentOutOfRangeException

Comments

@yume-chan
Copy link

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

  1. cd into a deep, long-named folder, e.g, ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
  2. resize the console so that the prompt occupies exactly one whole line (the cursor is at the second line), as the screenshot shows.
    image
  3. 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)
-----------------------------------------------------------------------
@yume-chan yume-chan changed the title System.ArgumentOutOfRangeException throw when press quotation mark System.ArgumentOutOfRangeException throw when press quote key May 16, 2019
@daxian-dbw daxian-dbw added this to the 2.0.0-Consider milestone Jun 18, 2019
@joeyaiello joeyaiello added the OutOfRange Issues relating to System.ArgumentOutOfRangeException label Jun 18, 2019
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

Successfully merging a pull request may close this issue.

3 participants