PSReadLine errors on paste of long code #4795

Closed
opened 2026-01-30 23:56:43 +00:00 by claunia · 10 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)
Author
Owner

@zadjii-msft commented on GitHub (Nov 4, 2019):

summoning @lzybkr and @stevel-msft

@zadjii-msft commented on GitHub (Nov 4, 2019): summoning @lzybkr and @stevel-msft
Author
Owner

@SteveL-MSFT commented on GitHub (Nov 4, 2019):

This has been fixed in PSReadLine 2.0.0-beta5 (run: install-module psreadline -allowprerelease -force). We haven't checked it into Windows yet, waiting til we get to GA (not Beta).

@SteveL-MSFT commented on GitHub (Nov 4, 2019): This has been fixed in PSReadLine 2.0.0-beta5 (run: install-module psreadline -allowprerelease -force). We haven't checked it into Windows yet, waiting til we get to GA (not Beta).
Author
Owner

@DHowett-MSFT commented on GitHub (Nov 4, 2019):

@SteveL-MSFT do you happen to have the number for the upstream PSReadline bug?

@DHowett-MSFT commented on GitHub (Nov 4, 2019): @SteveL-MSFT do you happen to have the number for the upstream PSReadline bug?
Author
Owner

@SteveL-MSFT commented on GitHub (Nov 5, 2019):

@DHowett-MSFT if you mean in VSO, there isn't one opened yet. We've been making tactical fixes in WinPS fork of PSRL as needed.

@SteveL-MSFT commented on GitHub (Nov 5, 2019): @DHowett-MSFT if you mean in VSO, there isn't one opened yet. We've been making tactical fixes in WinPS fork of PSRL as needed.
Author
Owner

@DHowett-MSFT commented on GitHub (Nov 5, 2019):

Alright, fair enough. I was thinking about one on GitHub so we could direct users there :)

@DHowett-MSFT commented on GitHub (Nov 5, 2019): Alright, fair enough. I was thinking about one on GitHub so we could direct users there :)
Author
Owner

@SteveL-MSFT commented on GitHub (Nov 6, 2019):

I guess you could say this is a dupe of https://github.com/PowerShell/PSReadLine/issues/1112. Can't find the original issue.

@SteveL-MSFT commented on GitHub (Nov 6, 2019): I guess you could say this is a dupe of https://github.com/PowerShell/PSReadLine/issues/1112. Can't find the original issue.
Author
Owner

@msftrncs commented on GitHub (Nov 7, 2019):

Note that there are still some errors that will be received while pasting in Windows Terminal even with PSReadLine 2.0.0-beta5.

https://github.com/PowerShell/PSReadLine/issues/1081 has some more on this. There are two or three different exception reports you may receive (at least in beta5) in this situation of pasting text in to Windows Terminal. They would all be remedied hard to discover if the CTRL-ENTER pasting problem was fixed.

@msftrncs commented on GitHub (Nov 7, 2019): Note that there are still some errors that will be received while pasting in Windows Terminal even with PSReadLine 2.0.0-beta5. https://github.com/PowerShell/PSReadLine/issues/1081 has some more on this. There are two or three different exception reports you may receive (at least in beta5) in this situation of pasting text in to Windows Terminal. They would all be ~remedied~ _hard to discover_ if the CTRL-ENTER pasting problem was fixed.
Author
Owner

@DHowett-MSFT commented on GitHub (Nov 7, 2019):

Which it is, as of today!

@DHowett-MSFT commented on GitHub (Nov 7, 2019): Which it is, as of today!
Author
Owner

@DHowett-MSFT commented on GitHub (Nov 7, 2019):

In light of that, I’m doing to close this as partially a /dupe of #1091 and partially an external bug.

@DHowett-MSFT commented on GitHub (Nov 7, 2019): In light of that, I’m doing to close this as partially a /dupe of #1091 and partially an external bug.
Author
Owner

@ghost commented on GitHub (Nov 7, 2019):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Nov 7, 2019): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4795