PSReadLine errors on paste of long code #4792

Open
opened 2026-01-30 23:56:39 +00:00 by claunia · 0 comments
Owner

Originally created by @dkcecil on GitHub (Nov 4, 2019).

Environment

Windows build number: 10.0.19013.0
Windows Terminal version (if applicable):0.6.2951.0

Any other software? PSReadLine 2.0.0

Steps to reproduce

Copy a PowerShell function at least twice the height of the terminal window to the clipboard. Right-mouse click paste the code in to terminal.

Expected behavior

The pasted function works as expected.

Actual behavior

The terminal window content area "flashes". Somewhere along the way an error appears--usually, but not always, after a closing brace (}). The error is, reported in red text, "Oops, something went wrong...Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new". The issues happens on PS 5.1 and PS 6.

Pasting the same code in to a non-terminal PS 5.1 works as expected with the same version of PSReadLine.

Error

Originally created by @dkcecil on GitHub (Nov 4, 2019). # Environment ```none Windows build number: 10.0.19013.0 Windows Terminal version (if applicable):0.6.2951.0 Any other software? PSReadLine 2.0.0 ``` # Steps to reproduce Copy a PowerShell function at least twice the height of the terminal window to the clipboard. Right-mouse click paste the code in to terminal. # Expected behavior The pasted function works as expected. # Actual behavior The terminal window content area "flashes". Somewhere along the way an error appears--usually, but not always, after a closing brace (}). The error is, reported in red text, "Oops, something went wrong...Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new". The issues happens on PS 5.1 and PS 6. Pasting the same code in to a non-terminal PS 5.1 works as expected with the same version of PSReadLine. ![Error](https://user-images.githubusercontent.com/46634177/68094989-a259d080-fe73-11e9-9478-21f75569f0db.PNG)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4792