Skip to content

System.ArgumentOutOfRangeException on paste #943

Closed

Description

I tried to paste a slightly long command in powershell and I got this exception:

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 -2.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Paste(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)

Environment data:

PS version:

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      17763  503

PSReadline version: 2.0.0-beta2
OS: 10.0.17763.1 (WinBuild.160101.0800)
PS file version: 10.0.17763.1 (WinBuild.160101.0800)

Activity

  1. djjohnsongeek commented on Jun 21, 2019

    @djjohnsongeek

    I've have the same issues while running a debugging session, it occurred after I added some args to the launch.json file.

    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 -3.
    at System.Console.SetCursorPosition(Int32 left, Int32 top)
    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(Nullable1 key, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
    at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
    at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

  2. daxian-dbw commented on Sep 12, 2019

    @daxian-dbw
    Member

    Fixed by #979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OutOfRangeIssues relating to System.ArgumentOutOfRangeException

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions