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

Bug While using arrow up in powershell within Windsurf IDE #4406

Closed
3 tasks done
LordSyd opened this issue Jan 29, 2025 · 1 comment
Closed
3 tasks done

Bug While using arrow up in powershell within Windsurf IDE #4406

LordSyd opened this issue Jan 29, 2025 · 1 comment

Comments

@LordSyd
Copy link

LordSyd commented Jan 29, 2025

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.3.5+2cc85806c561a9395751a96a818e8ff1592d19f7
PowerShell: 7.4.6
OS: Microsoft Windows 10.0.26100
BufferWidth: 83
BufferHeight: 16

Last 200 Keys:

 . e x e " Spacebar - C Spacebar " c : / r e p o s / s e q i t r a c k e r - s e r v e r " Spacebar - c Spacebar " c o r e . e d i t o r = c o d e Spacebar - - w a i t Spacebar - - r e u s e - w i n d o w " Spacebar c h e r r y - p i c k Spacebar 8 9 9 2 b 9 4 c 6 d 8 b 5 e c b 6 d c 4 7 8 4 b d e f 2 8 c d 0 a 1 8 d a 0 6 4 Enter
 r e Backspace Backspace Backspace g i t Spacebar r e s e t Spacebar - - h a r Spacebar Backspace d Spacebar Ctrl+v Enter
 g i t Spacebar f g Backspace l o w Spacebar f e a t u r e Spacebar s t a r t Spacebar t e s t _ r e b a s e Enter
 UpArrow

### 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 'top')      
Actual value was 16.
   at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.CalculateWhereAndWhatToRender(Boolean cursorMovedToInitialPos, RenderData renderData, LineInfoForRendering& lineInfoForRendering)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Render()
   at Microsoft.PowerShell.PSConsoleReadLine.UpdateFromHistory(HistoryMoveCursor moveCursor)
   at Microsoft.PowerShell.PSConsoleReadLine.HistoryRecall(Int32 direction)        
   at Microsoft.PowerShell.PSConsoleReadLine.PreviousHistory(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

I had this exception in Powershell within the Windsurf IDE when I pressed arrow up to reuse a previous command

Environment data

PS Version: 7.4.6
PS HostName: ConsoleHost
PSReadLine Version: 2.3.5
PSReadLine EditMode: Windows
OS: 10.0.26100.2308 (WinBuild.160101.0800)
BufferWidth: 83
BufferHeight: 16

Steps to reproduce

Could not reproduce it, sadly.

Expected behavior

No Exception and for it to give me the last command I used

Actual behavior

Above exception.

@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 Jan 29, 2025
@daxian-dbw
Copy link
Member

Thanks for reporting the issue. Unfortunately, I cannot reproduce the issue with the provided information (terminal buffer size and the last 200 keys). I will close this issue as no further action can be taken.

If the same exception ever happens to you again, it would be really helpful if you can share some additional information:

  1. Did you resize the terminal window before the exception happened? if yes, then what did you do for the resizing?
  2. Share a screenshot of the last couple of commands you ran before seeing this exception. This would provide more useful data.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants