microsoft / vscode

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

the part of block start is not showing when sticky scroll enabled #231629

Open ZACK-0013 opened 1 week ago

ZACK-0013 commented 1 week ago

Type: Bug

In the C/C++ source file, use 'Microsoft' code style, which is every brackets always break to a new line, then find that the start part doesn't show in the top of sticky scroll borad, there is only a '{' was shown.

VS Code version: Code 1.94.2 (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9750H 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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|undefined| |Memory (System)|15.88GB (8.25GB free)| |Process Argv|--crash-reporter-id 61492ffb-e481-44dd-8082-6f29c4bcc0e8| |Screen Reader|no| |VM|50%|
Extensions (36) Extension|Author (truncated)|Version ---|---|--- language-x86-64-assembly|13x|3.1.4 better-comments|aar|3.0.2 a-file-icon-vscode|ato|1.2.0 glsl-canvas|cir|0.2.15 doxdocgen|csc|1.4.0 auto-rename-tag|for|0.1.10 vscode-clangd|llv|0.1.29 workspace-cacheclean|Mam|0.0.2 vscode-language-pack-zh-hans|MS-|1.94.2024101609 black-formatter|ms-|2024.4.0 debugpy|ms-|2024.12.0 isort|ms-|2023.10.1 python|ms-|2024.16.1 vscode-pylance|ms-|2024.10.1 remote-ssh|ms-|0.115.0 remote-ssh-edit|ms-|0.87.0 remote-wsl|ms-|0.88.4 cpptools|ms-|1.22.9 cpptools-extension-pack|ms-|1.3.0 hexeditor|ms-|1.10.0 remote-explorer|ms-|0.4.3 live-server-preview|neg|0.1.4 hexeditor|not|1.8.2 nsight-vscode-edition|nvi|2024.1.34572442 fabric8-analytics|red|0.9.5 java|red|1.35.1 LiveServer|rit|5.7.9 open-in-browser|tec|2.0.0 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.3.1 vscode-gradle|vsc|3.16.4 vscode-java-debug|vsc|0.58.0 vscode-java-dependency|vsc|0.24.0 vscode-java-pack|vsc|0.29.0 vscode-maven|vsc|0.44.0 markdown-all-in-one|yzh|3.6.2 (2 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 2e7ec940:31000449 pythontbext0:30879054 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 da93g388:31013173 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 impr_priority:31102340 nativerepl2:31139839 refactort:31108082 pythonrstrctxt:31112756 wkspc-onlycs-t:31132770 nativeloc1:31134641 wkspc-ranged-t:31151552 cf971741:31144450 defaultse:31146405 iacca2:31156134 notype1cf:31157160 5fd0e150:31155592 icondisabled:31158250 ```
RedCMD commented 1 week ago

Image

if (a == b)
{
    if (a == b)
    {
        if (a == b)
        {
            if (a == b)
            {
                if (a == b)
                {
                    if (a == b)
                    {
                        if (a == b)
                        {
                            if (a == b)
                            {
                                if (a == b)
                                {
                                    if (a == b)
                                    {
                                        if (a == b)
                                        {
                                            if (a == b)
                                            {

                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
ZACK-0013 commented 1 week ago

That is the problem. This bug disappears when I use a different coding style where the braces do not wrap. Image