System.ArgumentOutOfRangeException in PSReadLine #1296

Closed
opened 2026-01-30 22:21:35 +00:00 by claunia · 2 comments
Owner

Originally created by @sba923 on GitHub (May 24, 2019).

Environment

PS version: 6.2.1
PSReadline version: 2.0.0-beta4 (unofficial build used by VScode PowerShell extension users)
os: 10.0.18362.1 (WinBuild.160101.0800)

Steps to reproduce

  • run PowerShell 6.2.1 as a tab in the Windows Terminal preview
  • enter a command line that's longer than the console's width
  • at the time the key is pressed that would result in a line wrap, I get:

image

(for some reason I can't copy the contents of the Windows Terminal tab as text...)

Expected behavior

Line wrap should occur, like it does when performing the exact same operation in PowerShell 6.2.1 outside of Windows Terminal

Actual behavior

PSReadLine throws an exception

Originally created by @sba923 on GitHub (May 24, 2019). # Environment ``` PS version: 6.2.1 PSReadline version: 2.0.0-beta4 (unofficial build used by VScode PowerShell extension users) os: 10.0.18362.1 (WinBuild.160101.0800) ``` # Steps to reproduce - run PowerShell 6.2.1 as a tab in the Windows Terminal preview - enter a command line that's longer than the console's width - at the time the key is pressed that would result in a line wrap, I get: ![image](https://user-images.githubusercontent.com/12860484/58303865-497d0b00-7df2-11e9-81e8-d50264ab55ab.png) (for some reason I can't copy the contents of the Windows Terminal tab as text...) # Expected behavior Line wrap should occur, like it does when performing the exact same operation in PowerShell 6.2.1 outside of Windows Terminal # Actual behavior PSReadLine throws an exception
Author
Owner

@zadjii-msft commented on GitHub (May 24, 2019):

That error pretty clearly tells you to file it over at lzybkr/PSReadline.

Does the bug go away if you Remove-Module PSReadline? Considering you're using the latest beta version, I'd presume there are still a few bugs left in it :P

@zadjii-msft commented on GitHub (May 24, 2019): That error pretty clearly tells you to file it over at [lzybkr/PSReadline](https://github.com/lzybkr/PSReadline). Does the bug go away if you `Remove-Module PSReadline`? Considering you're using the latest beta version, I'd presume there are still a few bugs left in it :P
Author
Owner

@sba923 commented on GitHub (May 25, 2019):

I've switched from the unofficial PSReadLine beta4 I'd been supplied to test issues with the VScode PowerShell 2.0.0 Preview 3 extension to the now-official PSReadLine beta4 from PSGallery.

Problem gone!

@sba923 commented on GitHub (May 25, 2019): I've switched from the unofficial PSReadLine beta4 I'd been supplied to test issues with the VScode PowerShell 2.0.0 Preview 3 extension to the now-official PSReadLine beta4 from PSGallery. Problem gone!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1296