Vscode: VS Code auto-complete can overwrite if typing too fast

Created on 8 Aug 2018  路  9Comments  路  Source: microsoft/vscode

Issue Type: Bug

VS Code suggestion box can be slower than typing and it can cause new typed code after the suggestion to be overwritten when it finds a separator token, like (.

This is happening very frequently when I type a call to "console.log", because the "log" statement is very short. What I observe is this:

  1. Start typing "console".
  2. When the auto-complete suggestions pop up, "console" is in there
  3. I ignore the suggestions and just keep typing the dot character folllowed by "log"
  4. Many times, the suggestion box is slow and doesn't catch up, so it still shows "console", even though I'm already past the dot and typing "log".
  5. When I type the open parenthesis character, it accepts the first suggestion on the box and overwrites everything I've written after it, including the dot.

This is what the text content looks like:
console // keep typing
console.log // keep typing
console( // after hitting the ( key, it overwrites everything after the suggestion

This started happening a few weeks ago.

VS Code version: Code 1.25.1 (1dfc5e557209371715f655691b1235b6b26a06be, 2018-07-11T15:40:20.190Z)
OS version: Linux x64 4.9.0-7-amd64


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz (12 x 3500)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
video_decode: unavailable_software
video_encode: enabled
vpx_decode: unavailable_software
webgl: enabled
webgl2: enabled|
|Load (avg)|1, 1, 2|
|Memory (System)|62.90GB (34.27GB free)|
|Screen Reader|no|
|VM|0%|

Extensions (10)

Extension|Author (truncated)|Version
---|---|---
bazel-code|Dev|0.1.9
tslint|eg2|1.0.34
hg|mrc|1.2.3
python|ms-|2018.7.1
java|red|0.29.0
vscode-java-debug|vsc|0.11.0
vscode-java-pack|vsc|0.3.0
vscode-java-test|vsc|0.7.1
vscode-maven|vsc|0.10.0
clang-format|xav|1.6.2


bug javascript verified

Most helpful comment

This only started occurring in the last several weeks so it was introduced in a recent release.

All 9 comments

Can you try setting editor.acceptSuggestionOnCommitCharacter to false and see if you still have this issue?

Setting "editor.acceptSuggestionOnCommitCharacter": false makes the suggestion no longer overwrite what I wrote.

There's a noticeable delay after typing the dot until the suggestions for console's members appear. I had enough time to capture the following screenshot. Note how "log" has already been typed, but "console" is still being suggested. Eventually, the suggestion box catches up with text, but the fact that it's not being reset after I type a separator like the dot seems to be what causes this.

console log

(BTW, I actually like this setting turned off)

This only started occurring in the last several weeks so it was introduced in a recent release.

+1 Also running into this pretty frequently

Do you have the vscode-styled-components extension installed and active ? I've found it to be the source of many intellisense/autocomplete issues recently. Everything goes haywire with it, and normal without.

I don't have it. Since I turned off that setting, I haven't had this issue, so I haven't bothered thinking much about it anyway.

@robertorfischer Did you have any typescript plugins installed in your project? Also, can you still reproduce this issue in the latest VS Code insiders build with all extensions disabled?

@mjbvz I'm not going to be able to try out the insiders build, sorry. Re-enabling editor.acceptSuggestionOnCommitCharacter makes the issue come back. After disabling all installing extensions and reloading, issue persists.
I'm now on version 1.27.1, commit starting with 5944e81.

Let me know if you still setting this on the current VS Code insiders 9e62a05bc7c5dbb74d165e06f7c3a5f3c7549096 with extensions (and TS plugins) disabled. We've made several fixes around intellisense suggestions and I can't repo this issue anymore

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philipgiuliani picture philipgiuliani  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments

borekb picture borekb  路  3Comments

lukehoban picture lukehoban  路  3Comments

biij5698 picture biij5698  路  3Comments