microsoft / vscode

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

Source control diffs have inconsistent tab widths until I click #170996

Closed puls closed 1 year ago

puls commented 1 year ago

Type: Bug

I have the following specified in .editorconfig:

root = true

[*]
indent_style = tab
indent_size = 2
tab_width = 2

When I open a diff from the Source Control sidebar, the new view on the right displays the tabs with the correct width, but the old view on the left displays them with a width of 4 until I click on it.

https://user-images.githubusercontent.com/9763/211641687-aa049dad-4e4b-4f10-9df2-86dd03bd4790.mov

VS Code version: Code 1.74.2 (e8a3071ea4344d9d48ef8a4df2c097372b0c5161, 2022-12-20T10:32:21.587Z) OS version: Darwin arm64 22.2.0 Modes: Sandboxed: Yes

System Info |Item|Value| |---|---| |CPUs|Apple M1 Max (10 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|4, 4, 5| |Memory (System)|32.00GB (0.35GB free)| |Process Argv|. --crash-reporter-id 2fb30fac-f750-45e3-8bd8-1aaec5a869ae| |Screen Reader|yes| |VM|0%|
Extensions (29) Extension|Author (truncated)|Version ---|---|--- path-intellisense|chr|2.8.4 vscode-eslint|dba|2.2.6 vscode-styled-jsx-languageserver|Div|1.3.1 gitlens|eam|13.2.0 EditorConfig|Edi|0.16.4 vscode-npm-script|eg2|0.3.29 prettier-vscode|esb|9.10.3 next-js|fox|0.0.2 vscode-graphql|Gra|0.8.4 vscode-graphql-execution|Gra|0.1.6 vscode-graphql-syntax|Gra|1.0.5 vscode-docker|ms-|1.23.3 remote-containers|ms-|0.266.1 gradle-language|nac|0.2.3 vscode-groovy-lint|Nic|2.0.0 swift-lang|ssw|0.10.0 vscode-styled-components|sty|1.7.5 vscode-mdx|uni|1.0.3 vscode-lldb|vad|1.8.1 intellicode-api-usage-examples|Vis|0.2.6 vscodeintellicode|Vis|1.2.30 vscode-swiftformat|vkn|1.6.1 vscode-gradle|vsc|3.12.6 vscode-java-debug|vsc|0.47.0 vscode-java-dependency|vsc|0.21.1 vscode-java-pack|vsc|0.25.7 vscode-maven|vsc|0.40.3 fig|wit|0.0.7 vitest-explorer|Zix|0.2.36
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593:30376534 pythonvs932:30410667 cppdebug:30492333 vscaac:30438847 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 azure-dev_surveyone:30548225 pyindex848:30577860 nodejswelcome1:30587005 282f8724:30602487 3d0df643:30613357 89544117:30613380 fim-prod:30623723 vscsb:30628654 ```
vscodenpa commented 1 year ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.74.3. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

lszomoru commented 1 year ago

@hediet, do you know if this could be related to the code changes that @alexdima made recently related to tab width?

hediet commented 1 year ago

Unfortunately, I don't know, but it could be. Were you able to reproduce?

alexdima commented 1 year ago

Does this reproduce when disabling all extensions? Press F1 and then choose Developer: Reload Window with Extensions Disabled

Kapture 2020-07-20 at 15 28 23

vscodenpa commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!