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

when using pylance code completion, press "enter” will replace the code wrote behind it. #7132

Closed
Kndy666 opened this issue Aug 21, 2022 · 4 comments

Comments

@Kndy666
Copy link

Kndy666 commented Aug 21, 2022

Describe your question
The action pylance code completion made is just like enabling the INSERT and enter new codes.It will replace the words behind the position you use the code completion.The first screenshot displays that I have selected the option before I press the enter.The second screenshot displays that after I press the enter, the bracket I have wrote before disappeared.

What have you tried?
I have no ideas whether it’s a bug or just I haven’t set current settings of pylance.At present, I just disabled the code completion.

ScreenShots
2022-08-21 152522
2022-08-21 152540

Configuration information
Visual Studio 2022 version 17.3.1
windows 10

@TheRealQuantam
Copy link

This is a problem I run into constantly. I was considering whether to make an issue for it. Honestly autocomplete in Visual Studio is pretty much useless in Python due to this and one other issue. My standard behavior when the autocomplete window pops up is to just hit ESC, as I know it won't work properly.

@Kndy666
Copy link
Author

Kndy666 commented Aug 22, 2022

Yes.The first time I met this problem,as usual,I pressed ESC to close the menu.The problem didn't exist when I use Visual Studio at version 2019 with language server Intellisense.But this version has more acute problems such as high cpu usage.On second thought,maybe python in visual studio isn't that welcome.

@TheRealQuantam
Copy link

IME autocomplete has never worked in VS/Python. In older versions it had the issue where you partially type in a name, then select something from the autocomplete box and it won't fully replace the partial name, leaving you with the autocomplete text plus a letter or two of what you typed, creating an invalid name that you don't notice until you run it and it fails.

@StellaHuang95
Copy link
Contributor

StellaHuang95 commented Aug 22, 2022

Similar issue was also mentioned in #6786.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants