Skip to content

System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. #503

Closed

Description

@pandom

Receive this bug when using command line history.

In history was a copy paste of code along with other commands. It is reproducible.

Oops, something went wrong. Please report this bug with the details below. Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new ----------------------------------------------------------------------- Last 200 Keys: Spacebar Spacebar Spacebar Spacebar Spacebar Enter Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar $ b o d y Spacebar = Spacebar $ x m l r o o t . o u t e r X m l Enter Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar I n v o k e - N s x W e b R e q u e s t Spacebar - m e t h o d Spacebar " P U T " Spacebar - U R I Spacebar $ u r i Spacebar - b o d y Spacebar $ b o d y Spacebar | Spacebar o u t - n u l l Enter Enter Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar Spacebar G e t - N s x F i r e w a l l T h r e s h o l d Enter Enter Spacebar Spacebar Spacebar Spacebar } Enter Enter Spacebar Spacebar Spacebar Spacebar e n d Spacebar { } Enter Enter Enter Enter Enter } Enter Enter Enter S e Backspace Backspace Ctrl+R - c p u Ctrl+R Ctrl+R 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.Console.SetCursorPosition(Int32 left, Int32 top) at Microsoft.PowerShell.Internal.TTYConsole.SetCursorPosition(Int32 left, Int32 top) at Microsoft.PowerShell.PSConsoleReadLine.PlaceCursor(Int32 x, Int32& y) at Microsoft.PowerShell.PSConsoleReadLine.PlaceCursor() at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender() at Microsoft.PowerShell.PSConsoleReadLine.Render() at Microsoft.PowerShell.PSConsoleReadLine.UpdateFromHistory(Boolean moveCursor) at Microsoft.PowerShell.PSConsoleReadLine.UpdateHistoryDuringInteractiveSearch(String toMatch, Int32 direction, Int32& searchFromPoint) at Microsoft.PowerShell.PSConsoleReadLine.InteractiveHistorySearchLoop(Int32 direction) at Microsoft.PowerShell.PSConsoleReadLine.InteractiveHistorySearch(Int32 direction) at Microsoft.PowerShell.PSConsoleReadLine.ReverseSearchHistory(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)

Activity

  1. lzybkr commented on Oct 17, 2017

    @lzybkr
    Contributor

    I believe this is fixed in #561.

    I'll publish a pre-release version to the PowerShell Gallery as soon as they support pre-releases.

    If you'd like to try a fix before that, you can build the lastest yourself from the master branch, or
    grab a build from AppVeyor like this one.

    Note the version number is now 2.0, so be sure to copy the contents to \PSReadLine\2.0.

  2. lzybkr commented on Nov 4, 2017

    @lzybkr
    Contributor

    I'll have an official prerelease build out next week if you want to verify this is fixed, otherwise you can grab a build out of appveyor here.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions