Skip to content

Here is a bug i just encountered while doing some work in vs code : #4687

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

Closed
3 tasks done
Pawan-git05 opened this issue Apr 2, 2025 · 2 comments
Closed
3 tasks done

Comments

@Pawan-git05
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

Last 115 Keys:
 c d Space " c : \ U s e r s \ a c e r \ D e s k t o p \ C o d i n g \ . v s c o d e \ S T L \ " Space ; Space i f Space ( $ ? ) Space { Space g + + Space m u l t i s e t . c p p Space - o Space m u l 
t i s e t Space } Space ; Space i f Space ( $ ? ) Space { Space . \ m u l t i s e t Space } Enter


Exception:
Parameter name: left
Actual value was -2.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

Screenshot

If you can help?

Environment data

PS Version: 5.1.19041.5607
PS HostName: ConsoleHost
PSReadLine Version: 2.0.0-beta2
PSReadLine EditMode: Windows
OS: 10.0.19041.1 (WinBuild.160101.0800)
BufferWidth: 201
BufferHeight: 42

Steps to reproduce

#include<bits/stdc++.h>
using namespace std;
int main(){
multisets;
// same as set just allow duplicate element to stores
s.insert(1);
s.insert(1);;
for(auto it:s){
cout<<it<<" ";
}
return 0;
}

Expected behavior

no exception

Actual behavior

no exception just the above bug is showing with output

@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 Apr 2, 2025
@Pawan-git05
Copy link
Author

Remove-Module PSReadLine; Import-Module PSReadLine
just run this command and it will be solved i just found its solution

Copy link

github-actions bot commented Apr 2, 2025

@Pawan-git05, you were using a pretty old version of PSReadLine (2.0.0-beta2 or prior), and it's likely that the issue was fixed in a newer version.
Please upgrade to the 2.3.5 version of PSReadLine from PowerShell Gallery.
See the upgrading section for instructions. Please let us know if you run into the same issue with the latest version.

@github-actions github-actions bot closed this as completed Apr 2, 2025
@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 Apr 2, 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

1 participant