vs-code terminal issue while cloning repository
### Prerequisites
- [x] Write a descriptive title.
- [x] Make sure you are able to repro it on the [latest released version](https://www.powershellgallery.com/packages/PSReadLine)
- [x] Search the existing issues, especially the pinned issues.
### Exception report
```console
Last 1 Keys:
Ctrl+v
Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the buffer size of the console of this size.
Parameter name: top
Real value was -1.
location: System.Console.SetCursorPosition(Int32 left, Int32 top)
location: Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
location: Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
location: Microsoft.PowerShell.PSConsoleReadLine.Paste(Nullable`1 key, Object arg)
location: Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
location: Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
location: Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
```
### Screenshot
<img width="1043" height="240" alt="Image" src="https://github.com/user-attachments/assets/169ef04b-fa88-4543-963b-46366c7b199a" />
* The translation of exception is given on the exception report.
### Environment data
```console
PSVersion 5.1.19041.6456
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.6456
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```
### Steps to reproduce
Ctrl + V {git clone https://github.com/ppy/osu; cd osu}
### Expected behavior
Under normal circumstances Ctrl + V should not have given an error and the git command should have been pasted on powershell and it should have cloned the required repository.
### Actual behavior
Got an ArgumentOutOfRange exception of the top parameter and powershell did not work as intended.
"git clone https://github.com/ppy/osu" given parameter as an example should not have caused such an error.
关闭于 2026-05-24 1 条评论