Skip to content

Error when command input exceeds window size #749

Closed
@daleecc

Description

@daleecc

System Details

  • Operating system name and version: Windows 7 (64-bit)
  • VS Code version: 1.12.1
  • PowerShell extension version: 1.0.0
PS > code -v

1.12.1
f6868fce3eeb16663840eb82123369dec6077a9b
PS > $pseditor.EditorServicesVersion


Major  Minor  Build  Revision
-----  -----  -----  --------
1      0      0      0


PS > code --list-extensions --show-versions

ms-vscode.csharp@1.9.0
ms-vscode.PowerShell@1.0.0
robertohuertasm.vscode-icons@7.7.0
PS > $PSVersionTable


Name                           Value
----                           -----
PSVersion                      5.0.10586.117
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.10586.117
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

When typing commands into the integrated terminal, if the edge of the window is reached (i.e. the command would wrap onto the next line), the error below occurs and the command will not execute.

An error occurred while reading input:

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 3000.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.EditorServices.Console.ConsoleReadLine.InsertInput(StringBuilder inputLine, Int32 promptStartCol, Int32 promptStartRow, String insertedInput, Int32 cursorInde
x, Int32 insertIndex, Int32 replaceLength, Int32 finalCursorIndex)
   at Microsoft.PowerShell.EditorServices.Console.ConsoleReadLine.<ReadLine>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PowerShell.EditorServices.Console.ConsoleService.<StartReplLoop>d__21.MoveNext()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions