Prerequisites
Exception report
Last 1 Keys:
Ctrl+v
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 -1.
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)
-----------------------------------------------------------------------
PS C:\Users\WPB\Local Sites\loginpress\app\public\wp-content\plugins\loginpress> phpcbf --standard=WordPress ./js/session-warning.js ./classes/class-loginpress-session-notification.php
Screenshot
Additional information:
Happens with long commands or commands containing comments (//).
Works if pasting shorter commands or using a different terminal (e.g., VS Code).
PSReadLine version:
Windows version:
PowerShell version:
Workarounds:
Remove comments from the command before pasting.
Use Ctrl+Shift+V in compatible terminals.
Temporarily disable PSReadLine using Remove-Module PSReadLine
Environment data
Property Value
PowerShell Version 5.1.19041.6456
Host Name ConsoleHost
PSReadLine Version 2.0.0
PSReadLine EditMode Windows
OS Windows
Buffer Width 119
Buffer Height 14
Steps to reproduce
Open Windows PowerShell (with PSReadLine enabled).
Paste the following command using Ctrl+V:
phpcbf --standard=WordPress ./js/session-warning.js ./classes/class-loginpress-session-notification.php // Bug Report Title And Description
Expected behavior
The command should paste normally without exceptions.
Actual behavior
PowerShell throws an 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 -1.
at System.Console.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
...
Prerequisites
Exception report
Screenshot
Additional information:
Workarounds:
Environment data
Steps to reproduce
Open Windows PowerShell (with PSReadLine enabled).
Paste the following command using Ctrl+V:
phpcbf --standard=WordPress ./js/session-warning.js ./classes/class-loginpress-session-notification.php// Bug Report Title And DescriptionExpected behavior
The command should paste normally without exceptions.
Actual behavior
PowerShell throws an exception: