question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autocomplete often incorrectly replaces typed text

See original GitHub issue

Original 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 becomes nameof
  • private becomes partial
  • return becomes ref

bad-autocomplete.zip

Environment data

`dotnet --info` output: .NET Core SDK (reflecting any global.json): Version: 2.1.301 Commit: 59524873d6

Runtime 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:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:34 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
kettle11commented, May 9, 2019

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.

2reactions
silicakescommented, Jul 17, 2019

Started happening to me following the recent update:

OS: macOS Mojave (10.14.5) VSCode version: 1.36.1 language within editor: Javascript

flaky_autocomplete

It seems like the autocompletion is selected by default and pressing the semicolon key triggers it.

EDIT: restarting vscode solved the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Intellisense replaces your text with random garbage if you type ...
If you type quicker than Intellisense can build its list of suggestions, when you press TAB it often replaces what you've typed with...
Read more >
How to use Auto-Correction and predictive text on your iPhone ...
To manage text replacement, tap Settings > General > Keyboard > Text Replacement. , then enter your phrase and shortcut.
Read more >
Stop default Autocomplete behavior when hitting spacebar
For example, if you enter an identifier that is not in the list and press TAB, in completion mode the entry would replace...
Read more >
bug? autocomplete replacing next word
I am running the OSX version of PHPStorm. (98.108). I did the File-Invalidate Caches after installing it. I really like the autopopup feature ......
Read more >
Too Many Autocorrect Fails? How to Tweak Your Keyboard ...
You're typing a text message on your iPhone, and the built-in ... feature sometimes results in incorrect words that you need to modify, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found