Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception - seemingly caused by github copilot suggestion issue (italics text in screenshot) #4073

Open
3 tasks done
oliver-sey opened this issue Jul 12, 2024 · 3 comments
Open
3 tasks done
Labels
Needs-Triage 🔍 It's a new issue that core contributor team needs to triage.

Comments

@oliver-sey
Copy link

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

Oops, something went wrong.
Please report this bug with ALL the details below, including both the 'Environment' and 'Exception' sections.
Please report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new?template=Bug_Report.yaml
Thank you!

### Environment
PSReadLine: 2.4.0-beta0+923a890f2e7ea10465f3a80a2bc030121a1c2f68
PowerShell: 2024.2.2
OS: Microsoft Windows 10.0.22631
BufferWidth: 124
BufferHeight: 10

Last 200 Keys:

 Backspace Backspace Backspace i n i Tab Enter
 p r o v Tab Enter
 UpArrow Spacebar - S E R V I C E _ N A M E Spacebar " t e s t c s h a r p " Enter
 Ctrl+c k u b e c t l Spacebar l o g s Spacebar t e s t c s h a r p - s t a t e f u l s e t - 9 0 Backspace Backspace 0 Enter
 h Backspace Backspace g i t Spacebar Tab Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace RightArrow Enter
 p r o Backspace Backspace Backspace Backspace k u b e c t l Spacebar g e t Spacebar a l l Enter
 p r o v Tab RightArrow Ctrl+LeftArrow Ctrl+RightArrow LeftArrow 3 Enter
 k u b e c t l Spacebar l o g s Spacebar t e s t c s h a r p 3 - 0 Enter
 UpArrow Enter
 k u b e c t l Spacebar d e s c Ctrl+c

### 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 10.
   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.CancelLine(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.CopyOrCancelLine(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(PSKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken, Nullable`1 lastRunStatus)

Screenshot

image

Environment data

PS Version: 5.1.22621.3880
PS HostName: Visual Studio Code Host
PSReadLine Version: 2.4.0-beta0
PSReadLine EditMode: Windows
OS: 10.0.22621.1 (WinBuild.160101.0800)
BufferWidth: 124
BufferHeight: 32

Steps to reproduce

type something, wait for copilot suggestion to pop up, ctrl c

Expected behavior

a new clean prompt for you to enter a command

Actual behavior

The exception that is described above happens. I also often get an issue, especially after resizing the terminal, where the text I am typing overwrites the 'PS :', or commands that I previously ran. Or when I start typing a command it is weirdly a bunch of lines down the screen from the last command I ran, and weirdly to the right side. This happens a lot when I am opening and closing the left side menu in vscode. It's possible those similar causes are a cause here

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Jul 12, 2024
@daxian-dbw
Copy link
Member

I cannot reproduce the issue Did you resize the terminal window before you pressed Ctrl+c?

@oliver-sey
Copy link
Author

oliver-sey commented Aug 5, 2024 via email

@daxian-dbw
Copy link
Member

For example, one line of output would be repeated many times and overwrite other lines after resizing.

Could you please give a detailed repro for this issue instead? Resizing the window could cause issue to PSReadLine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Triage 🔍 It's a new issue that core contributor team needs to triage.
Projects
None yet
Development

No branches or pull requests

2 participants