microsoft / vscode

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

intellisense incorrectly autocorrects correct symbols when there are two that differ only by case. #203584

Closed jsclary closed 8 months ago

jsclary commented 8 months ago

Type: Bug

Consider a situation where you have the variables G and g. I'm workin in javascript at present so it would be: let G = {}; let g = { x: 1 }; If I then type "g.", it gets instantly autocorrected to "G." as it seem to take the first match in whatever sort order is being used regardless of whether there is an exact match for "g." If I disable File->Preferences->Settings->Text Editor->Accept Suggestions On Commit Character, it no longer does this but then it also no longer corrects incorrect capitalization of known symbols. I suppose silently changing the meaning of valid code to something likely to be invalid could be considered a feature by some but one would hope they'd be in the minority.

VS Code version: Code 1.85.2 (8b3775030ed1a69b13e4f4c628c612102e30a681, 2024-01-18T06:40:10.514Z) OS version: Windows_NT x64 10.0.22635 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz (12 x 2592)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.84GB (2.66GB free)| |Process Argv|--crash-reporter-id b0328d36-e573-4081-97ba-df1d9ec407e5| |Screen Reader|no| |VM|0%|
Extensions (49) Extension|Author (truncated)|Version ---|---|--- markdown-preview-github-styles|bie|2.0.3 blockceptionvscodeminecraftbedrockdevelopmentextension|Blo|7.0.21 vscode-model-viewer|clo|0.0.3 vscode-markdownlint|Dav|0.53.0 vscode-eslint|dba|2.4.4 githistory|don|0.6.20 gitlens|eam|14.7.0 vscode-github-actions|git|0.26.2 vscode-pull-request-github|Git|0.78.1 todo-tree|Gru|0.0.226 vscode-test-explorer|hbe|2.21.1 rust-doc-viewer|JSc|4.2.0 rainbow-csv|mec|3.11.0 minecraft-debugger|moj|1.2.1 vscode-uuid-generator|mot|0.4.1 azure-pipelines|ms-|1.228.0 azure-dev|ms-|0.8.0 vscode-azureappservice|ms-|0.25.1 vscode-azurecontainerapps|ms-|0.6.1 vscode-azurefunctions|ms-|1.13.1 vscode-azureresourcegroups|ms-|0.8.3 vscode-azurestaticwebapps|ms-|0.12.2 vscode-azurestorage|ms-|0.15.3 vscode-azurevirtualmachines|ms-|0.6.5 vscode-cosmosdb|ms-|0.20.1 vscode-docker|ms-|1.28.0 csdevkit|ms-|1.2.7 csharp|ms-|2.15.30 vscode-dotnet-runtime|ms-|2.0.1 vscodeintellicode-csharp|ms-|0.1.26 vscode-edge-devtools|ms-|2.1.3 remote-containers|ms-|0.327.0 remote-wsl|ms-|0.81.9 azure-account|ms-|0.11.6 hexeditor|ms-|1.9.12 live-server|ms-|0.4.13 test-adapter-converter|ms-|0.1.9 vscode-node-azure-pack|ms-|1.2.0 mcmodel-viewer|Ora|1.3.0 cargo|pan|0.2.3 bevy-snippets|pix|4.0.1 vscode-yaml|red|1.14.0 rust-analyzer|rus|0.3.1815 crates|ser|0.6.6 vscode-rust-test-adapter|Swe|0.11.0 even-better-toml|tam|0.19.2 es6-string-html|Tob|2.14.1 errorlens|use|3.16.0 vscode-lldb|vad|1.10.0
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyonecf:30548226 2i9eh265:30646982 962ge761:30933248 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 dsvsc019a:30933241 ```
VSCodeTriageBot commented 8 months 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 similar existing issues. See also our issue reporting guidelines.

Happy Coding!