vscode: Intellisense/Autocompletion initial scroll position problem

Issue Type: Bug

I’m attaching a recording below:

mUwfXkf8nc

I’m pressing ctrl+space.

Depending on whether the cursor is immediately after the { or at least one space after, the scroll position of the completion list will be different.

The options are still at the top of the list in the second case, but it’s inconvenient having to scroll up every time.

I feel like this may have already been reported but I couldn’t find anything. Hopefully this can be improved.

VS Code version: Code 1.44.2 (ff915844119ce9485abfe8aa9076ec76b5300ddd, 2020-04-16T16:36:23.138Z) OS version: Windows_NT x64 10.0.19041 Remote OS version: Linux x64 4.19.84-microsoft-standard Remote OS version: Linux x64 4.19.84-microsoft-standard Remote OS version: Linux x64 4.19.84-microsoft-standard

System Info
Item Value
CPUs Intel® Core™ i7-7700K CPU @ 4.20GHz (8 x 4200)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.96GB (2.06GB free)
Process Argv
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 4.19.84-microsoft-standard
CPUs Intel® Core™ i7-7700K CPU @ 4.20GHz (8 x 4200)
Memory (System) 9.73GB (1.05GB free)
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 4.19.84-microsoft-standard
CPUs Intel® Core™ i7-7700K CPU @ 4.20GHz (8 x 4200)
Memory (System) 9.73GB (1.05GB free)
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 4.19.84-microsoft-standard
CPUs Intel® Core™ i7-7700K CPU @ 4.20GHz (8 x 4200)
Memory (System) 9.73GB (1.05GB free)
VM 0%

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 21 (7 by maintainers)

Most upvoted comments

Glad I found this Issue, I am having the same complaints. It really kills your flow whenever this happens…

I decided to set "editor.suggestSelection": "first" since I rarely use snippets and just want to autocomplete keys…

Maybe it’s possible it drifts one scroll position downwards under certain circumstances until after enough time it ends up in the middle of the entire list.

No. That’s on purpose. The editor remembers that for a certain context a certain completion has been selected in the past it will reveal that. You control this via the editor.suggestSelection setting

Sorry. Indeed it won’t reproduce directly in a new VSCode window. I still think it is related to the first few letters of what it thinks the context for that completion should be. My initial report shows similar behavior (it opens at the letter i).

If there is any other tracing information I could provide while the issue manifests, let me know.

Edit: setting editor.suggestSelection from recentlyUsed to first makes the issue less annoying at least.

Should this option have first as the default value?

This actually happened this milestone via: https://github.com/microsoft/vscode/issues/136864. Sorry for not remembering this issue but I believe we are better off now. Closing this as dupe/resolved. Changes are in current insiders and next stable release