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

Autocomplete after open brackets replaces entire line of code #6786

Closed
vsfeedback opened this issue Nov 16, 2021 · 27 comments
Closed

Autocomplete after open brackets replaces entire line of code #6786

vsfeedback opened this issue Nov 16, 2021 · 27 comments

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice] [regression] [worked-in:Visual Studio 2019 v. 16.11.6]
Visual Studio Community 2022 Current v. 17.0.0 (Windows) in conjunction with the Python extension contains the following bug:
If auto-completion / IntelliSense is used after open brackets, not only the word is completed and inserted, but the entire line of code is deleted and overwritten with the word.

Simple example:
testword = "This is a test."
print (testw ... #use of IntelliSense leads to ==>
testword

The bug does not occur in Visual Studio Community 2019 (Python) and Visual Studio Code (Python).


Original Comments

Feedback Bot on 11/15/2021, 00:17 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

@AdamYoblick
Copy link
Member

I'm able to repro this in VS2022. The entire line doesn't get replaced, BUT the opening parens does, which is definitely a bug.

@Stroichik
Copy link

So, after 3 months its still not fixed?

@AdamYoblick
Copy link
Member

Hi @Stroichik ! Unfortunately, our team has limited capacity at the moment, and we have to prioritize our backlog accordingly.

We appreciate your patience. We also welcome contributions fyi 😄

@Stroichik
Copy link

Can't help you on that, since i`m just learning basics. Was very surprised when i found this bug in VS22, so had to switch to other IDE to continue learning Python without accidently erasing whole lines of code. So u dont really want someone like me to accidently commit on release branch :)

@MartinLith
Copy link

H! Any news on this, it´s quite annoying and it makes you stay away from the intellisense/autocomplete (which it seems not like at all).

@AdamYoblick
Copy link
Member

No updates yet, as I’ve been working on python 3.10 support. Our capacity has been a little low lately, so bug fixes are taking longer than anticipated. My apologies.

This is the next bug I will look at once all the 3.10 kinks have been worked out. Thanks :)

@MartinLith
Copy link

MartinLith commented Mar 12, 2022

Hi Adam,
thanks you for your answer!

No problem! i´m glad to hear that this is next up and i´m looking forward to a solution.

Martin

@AdamYoblick
Copy link
Member

I believe this is an LSP client bug in Visual Studio. I've created an internal bug to track this at https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1528198.

@AdamYoblick AdamYoblick added the waiting for upstream Waiting for upstream to release a fix label Apr 22, 2022
@AdamYoblick
Copy link
Member

Sorry my last comment wasn't clear. Reproing this bug is blocked by another bug which is preventing variables from showing up in the intellisense completion list. That bug doesn't belong our team, so we're waiting on a fix from the VS team before I can continue with this one. Apologies for the delay.

@marcinchady
Copy link

I'm on version 17.1.3 and the completion lists populate no problem. The bug is still present, i.e. selecting an item from the list eats the closing bracket and the following operator, if there is one. See the attached video.

2022-04-27.20-26-23.mp4

.

@VintageStep
Copy link

After looking for workarounds I ended here, I have both of the problems presented by vsfeedback and marcinchady, when using autocomplete function inside a list, tuplet or set the end of the bracket get deleted if there are quotes or doubles quotes those get deleted too. As for inserting arguments in functions hitting autocomplete overwrite the previous characters.
I hope your team can address this bug soon, at least now I know that is something I just have to bear with instead of a feature I didn't set up correctly.

@AdamYoblick
Copy link
Member

Thank you for the information everyone. I've spoken with the Visual Studio team and this is actually happening in some other languages as well, so we believe this is not a PTVS-specific bug. I'm going to create a bug for the VS team to look at. In the meantime, if this happens to anyone else, be sure to create a feedback ticket through VS. Thanks :)

@SpookyWookyMan
Copy link

Any updates on this? This bug has still not been fixed and while I love Visual Studio, I have no choice but to change to another IDE where the autocomplete feature actually works

@AdamYoblick AdamYoblick removed the waiting for upstream Waiting for upstream to release a fix label Jul 13, 2022
@AdamYoblick
Copy link
Member

Apologies, there was some confusion around where this bug actually is and who owns it. This is my current task and I will get it fixed one way or another 😄

@AdamYoblick AdamYoblick added the waiting for upstream Waiting for upstream to release a fix label Jul 14, 2022
@AdamYoblick
Copy link
Member

We looked into this further and the bug seems to be in an external team. We've spoken to the team and the bug now has proper ownership. I will stay on top of it to make sure it gets fixed.

@TheRealQuantam
Copy link

TheRealQuantam commented Sep 10, 2022

Gotta say given that IME IntelliSense hasn't ever worked right with Python I'm not holding my breath :P At least this (new) IntelliSense problem is better than the old one. The old one could easily result in invalid variable names that you don't catch until the code fails, while this one is usually immediately obvious when the line changes drastically.

@JamieSimWin
Copy link

I've been having this issue for a couple of weeks and i have been trying to solve the issue. This is the only information i can find online about this issue.. which still isn't fixed.....

@AdamYoblick
Copy link
Member

Hi all, this is a Visual Studio fix, not a PTVS one. Their team had some urgent fixes they had to make that had higher priority than this one. They will be working on this for a future release of Visual Studio. I will reply back when it gets fixed 😄

@ReineWahrheit
Copy link

Currently having this issue on a fresh install of Visual Studio 2022 in all languages, mostly just tried the C languages. I can't even edit anything without having to retype the entire line of code because everything gets typed over instead of shifted. Any updates when this might be fixed?

@bluehatgeek
Copy link

The issue is still there. I am currently on a fresh install of VS 2022 and it is still happening.

@AdamYoblick AdamYoblick added fixed in next version A fix has been implemented an will appear in an upcoming version and removed waiting for upstream Waiting for upstream to release a fix labels Feb 6, 2023
@AdamYoblick
Copy link
Member

Hi everyone, I'm trying to reproduce this locally on the latest internal build of visual studio and I can't repro it anymore. It seems the visual studio team has fixed the issue. See below:

pythonAQutocomplete

The version of VS I'm on is 17.6 Preview 2. 17.6 will be available to the general public on 5/16.

@hitarthdoc
Copy link

Checked in Visual Studio Preview 17.5 with ONLY the python development workload and tested it.
Could not repro this issue.

Install Details,

Microsoft Visual Studio Community 2022 (64-bit) - Preview
Version 17.5.0 Preview 6.0
VisualStudio.17.Preview/17.5.0-pre.6.0+33402.96

@CaligoLab
Copy link

CaligoLab commented Oct 23, 2023

@AdamYoblick
Microsoft Visual Studio Community 2022 (64-bit) - Current
Version 17.4.4 (Win)
Python
Autocomplete messes up constantly. Picks up variables to suggest from time to time only, removes pieces of code around.
Here's a simple example:

autocomplete_bug.mp4

@judej judej reopened this Oct 25, 2023
@judej judej removed the fixed in next version A fix has been implemented an will appear in an upcoming version label Oct 25, 2023
@AdamYoblick
Copy link
Member

@CaligoLab Thank you for reporting this. I will try to repro with the latest version of VS again. 👍

@AdamYoblick
Copy link
Member

@CaligoLab The version you reported this issue in is 17.4.4. I tested previously in 17.6 and couldn't repro this. I just tested again in 17.9 and also couldn't repro it.

Someone else in the comments tested in 17.5 and also couldn't repro.

So I believe this issue is fixed. Can you please try to update your Visual Studio to at least 17.5 or 17.6 and try again?

Copy link

This issue was closed because it has been stalled for 30 days with no activity. If the issue still persists, please reopen with the information requested. Thanks.

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

16 participants