Autocomplete often incorrectly replaces typed text
See original GitHub issueOriginal issue reported here: https://github.com/Microsoft/vscode/issues/57037 I was asked to refer this issue to the C# extension project instead.
Often, while typing in the editor, when I press space after a word, the editor will replace the perfectly valid code with something invalid. I am currently working in C#, and have this happen frequently with several keywords. Today, I tried the Insiders build as well, but still run into the issue. I have also attached a video of the problem happening.
Some examples:
new
becomesnameof
private
becomespartial
return
becomesref
Environment data
`dotnet --info` output:
.NET Core SDK (reflecting any global.json): Version: 2.1.301 Commit: 59524873d6Runtime Environment: OS Name: Mac OS X OS Version: 10.13 OS Platform: Darwin RID: osx.10.13-x64 Base Path: /usr/local/share/dotnet/sdk/2.1.301/
Host (useful for support): Version: 2.1.1 Commit: 6985b9f684
.NET Core SDKs installed: 2.1.301 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
VS Code version: 1.26.1 and 1.27.0-insiders C# Extension version: 1.15.2
Steps to reproduce
Type an entire name/keyword, verbatim, in the editor and press the spacebar. It does not always happen, but happens enough to be extremely frustrating and to severely impact my productivity.
Expected behavior
Typed name or keyword matches the top entry in the suggestion list and should not be changed.
Actual behavior
Typed name or keyword changes to an unrelated, and often semantically invalid, name or keyword.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:34 (10 by maintainers)
Top GitHub Comments
I wanted to chime in this has been occuring for me for a long time (not sure on the exact time frame) with Unity / VS Code. It occurs when I type “int” followed by spacebar and it completes to “iPhoneSettings”. I’m using Visual Studio Code on OSX. It is a major productivity drain for me.
Also, the Visual Studio Code issue @HardcodedNumber referenced is closed with the reason given that it’s an extension issue, not a VS Code issue.
Edit: I’d like to add that this is dependent on how quickly I type. If I type “int” and spacebar very quickly “iPhoneSettings” is inserted. If I pause before pressing the spacebar “int” is inserted.
Started happening to me following the recent update:
OS: macOS Mojave (10.14.5) VSCode version: 1.36.1 language within editor: Javascript
It seems like the autocompletion is selected by default and pressing the semicolon key triggers it.
EDIT: restarting vscode solved the issue.