microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.19k stars 29.29k forks source link

suggestion commit character evaluated before suggestions updated #68273

Closed mgabeler-lee-6rs closed 5 years ago

mgabeler-lee-6rs commented 5 years ago

Issue Type: Bug

I've noticed since the 1.31.0 update some interaction with one of my extensions has made the suggestions popup slow to update (if I disable all extensions, it is not slow, but I have not figured out which extension or combination is causing the slowness).

However, with the slowness to update, it has exposed an underlying issue:

When I press a commit character, it commits whatever suggestion is currently at the top. It does not wait for the suggestions to update with the text I've typed, so it can cause lots of good text to be discarded in favor of an obsolete suggestion.

For example, typing up a bunch of mocha tests using chancejs, I'm seeing:

And so on. Others are even worse, but these are simple and easy to make sense of without tons of context from my code.

VS Code version: Code 1.31.0 (7c66f58312b48ed8ca4e387ebd9ffe9605332caa, 2019-02-06T08:51:24.856Z) OS version: Linux x64 4.19.0-1-amd64

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2519)| |GPU Status|2d_canvas: enabled
checker_imaging: disabled_off
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
surface_synchronization: enabled_on
video_decode: unavailable_off
webgl: enabled
webgl2: enabled| |Load (avg)|4, 4, 4| |Memory (System)|15.55GB (2.14GB free)| |Process Argv|--unity-launch| |Screen Reader|no| |VM|0%|
Extensions (17) Extension|Author (truncated)|Version ---|---|--- ng-template|Ang|0.1.11 markdown-preview-github-styles|bie|0.1.4 bracket-pair-colorizer-2|Coe|0.0.26 vscode-markdownlint|Dav|0.23.0 vscode-eslint|dba|1.8.0 EditorConfig|Edi|0.12.8 vscode-npm-script|eg2|0.3.5 beautify|Hoo|1.4.8 bash-ide-vscode|mad|1.3.3 terraform|mau|1.3.7 Go|ms-|0.9.1 debugger-for-chrome|msj|4.11.1 vscode-docker|Pet|0.5.2 vscode-nginx|sha|0.6.0 html-preview-vscode|tht|0.2.5 reflow-paragraph|Tro|1.3.0 vscode-proto3|zxh|0.2.2 (1 theme extensions excluded)
mgabeler-lee-6rs commented 5 years ago

Loosely related to: https://github.com/Microsoft/vscode/issues/67698

Disabling the editor.acceptSuggestionOnCommitCharacter partially works around this. I say partial because:

jrieken commented 5 years ago

/duplicate of #66868

vscodebot[bot] commented 5 years ago

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!