PowerShell / PSReadLine

A bash inspired readline implementation for PowerShell
BSD 2-Clause "Simplified" License
3.77k stars 298 forks source link

System.ArgumentOutOfRangeException in PSReadLine #4167

Closed superprogramer123 closed 2 months ago

superprogramer123 commented 2 months ago

Prerequisites

Exception report

I encountered a `System.ArgumentOutOfRangeException` while using PSReadLine. The error message is as follows:
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.

Screenshot

Capture

Environment data

PSReadLine Version:PSReadline 2.0.0
PowerShell Version:Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      19041  4780
Operating System Details:
CsName            : DESKTOP-618M4H9
OsName            : Microsoft Windows 10 Pro
OsArchitecture    : 64-bit
WindowsVersion    : 2009
WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406

Steps to reproduce

  1. Open PowerShell.
  2. Execute a command that triggers the error.

Expected behavior

The command should execute without throwing an exception.

Actual behavior

The command throws a System.ArgumentOutOfRangeException.

superprogramer123 commented 2 months ago

please help and solve this bug!