microsoft / vscode

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

Sticky scroll doesn't work correctly in Rust #157987

Closed zxch3n closed 2 years ago

zxch3n commented 2 years ago

Type: Bug

For a code snippet like this, it should make my_func sticky. But currently, it makes #[inline] sticky.

#[inline]
fn my_func() {

}

Screenshots

Case 1

image

After scrolling down

image

Case 2

image

After scrolling down

image

VS Code version: Code 1.70.1 (6d9b74a70ca9c7733b29f0456fd8195364076dda, 2022-08-10T06:08:46.959Z) OS version: Darwin arm64 21.6.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 (8 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
webgl: enabled
webgl2: enabled| |Load (avg)|1, 2, 1| |Memory (System)|16.00GB (0.07GB free)| |Process Argv|--crash-reporter-id d4200526-e225-4483-b5e2-ee423130839d| |Screen Reader|yes| |VM|0%|
Extensions (115) Extension|Author (truncated)|Version ---|---|--- Bookmarks|ale|13.3.1 numbered-bookmarks|ale|8.3.1 project-manager|ale|12.6.1 preview-mp4|ana|0.0.1 iconify|ant|0.3.6 icons-carbon|ant|0.2.5 slidev|ant|0.4.0 vite|ant|0.2.5 code-gnu-global|aus|0.2.2 markdown-emoji|bie|0.3.0 markdown-mermaid|bie|1.14.3 vscode-tailwindcss|bra|0.8.6 better-toml|bun|0.3.2 rescript-vscode|che|1.4.2 npm-intellisense|chr|1.4.2 path-intellisense|chr|2.8.1 doxdocgen|csc|1.4.0 vscode-eslint|dba|2.2.6 vscode-deno|den|3.13.1 githistory|don|0.6.19 xml|Dot|2.5.1 vscode-wasm|dts|1.3.1 vscode-swift-syntax|dun|0.0.4 rust-syntax|dus|0.6.1 gitlens|eam|12.1.2 EditorConfig|Edi|0.16.4 vsc-material-theme|Equ|33.5.0 vsc-material-theme-icons|equ|2.3.1 prettier-vscode|esb|9.5.0 vscode-open-in-npm|fab|1.0.4 vscode-flow-ide|gca|1.2.0 copilot|Git|1.39.6432 vscode-pull-request-github|Git|0.48.0 go|gol|0.35.1 gc-excelviewer|Gra|4.2.55 vscode-graphql-syntax|Gra|1.0.4 todo-tree|Gru|0.0.215 markdown-image|han|1.1.22 haskell|has|2.2.1 vscode-drawio|hed|1.6.4 easy-snippet|inu|0.6.3 gitlab-mr|jas|1.4.3 better-cpp-syntax|jef|1.15.19 vscode-peacock|joh|4.0.1 cmake-language-support-vscode|jos|0.0.4 rust-doc-viewer|JSc|3.0.2 language-haskell|jus|3.6.0 google-search|kam|0.0.1 deno-std-lib-snippets|lau|0.0.8 restructuredtext|lex|189.1.0 regionfolder|map|1.0.18 cortex-debug|mar|1.4.4 git-graph|mhu|1.30.0 import-sorter|mik|3.3.1 vscode-docker|ms-|1.22.1 csharp|ms-|1.25.0 vscode-dotnet-runtime|ms-|1.5.0 python|ms-|2022.12.0 vscode-pylance|ms-|2022.8.20 jupyter|ms-|2022.7.1002181843 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.9 remote-containers|ms-|0.241.3 cmake-tools|ms-|1.11.26 cpptools|ms-|1.11.5 cpptools-extension-pack|ms-|1.2.0 hexeditor|ms-|1.9.8 test-adapter-converter|ms-|0.1.6 vscode-github-issue-notebooks|ms-|0.0.119 vscode-selfhost-test-provider|ms-|0.3.10 vsliveshare|ms-|1.0.5683 color-highlight|nau|2.5.0 ocaml-platform|oca|1.10.7 vetur|oct|0.36.0 indent-rainbow|ode|8.3.1 cargo|pan|0.2.3 phoityne-vscode|pho|0.0.27 excalidraw-editor|pom|3.2.0 prisma|Pri|4.2.0 java|red|1.9.0 vscode-commons|red|0.0.6 LiveServer|rit|5.7.5 color-manager|roy|0.7.5 rust-analyzer|rus|0.3.1162 gruvbox-material|sai|6.5.1 crates|ser|0.5.10 mdx|sil|0.1.1 just|ske|2.0.0 vscode-hexdump|sle|1.8.1 code-spell-checker|str|2.5.4 vscode-stylelint|sty|1.2.2 svelte-vscode|sve|105.20.0 even-better-toml|tam|0.17.1 tauri-vscode|tau|0.1.6 markdown-links|tch|0.8.0 vscode-markdown-paste-image|tel|0.19.1 deno-standard-lib-snippets|Thi|4.0.0 language-pde|Tob|1.4.6 pdf|tom|1.2.0 simple-rst|tro|1.5.2 cmake|twx|0.0.17 errorlens|use|3.6.0 vscode-torque|v8-|1.0.3 vscode-lldb|vad|1.7.3 vscodeintellicode|Vis|1.2.22 vscode-icons|vsc|11.15.0 vscode-outliner|Vsc|0.1.4 vim|vsc|1.23.2 codetour|vsl|0.0.58 volar|Vue|0.40.1 vscode-wakatime|Wak|18.1.7 fig|wit|0.0.6 markdown-all-in-one|yzh|3.4.3 vitest-explorer|Zix|0.2.27 vscode-proto3|zxh|0.5.5 (2 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonvspyt551cf:30345471 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30410667 wslgetstarted:30449410 cppdebug:30492333 vscaac:30438847 pylanb8912:30529769 vsclangdf:30486550 c4g48928:30535728 hb751961:30543456 dsvsc012:30540252 ```
aiday-mar commented 2 years ago

Thank you for your feedback. This is a duplicate of the issue https://github.com/microsoft/vscode/issues/157180. Note that the changes are currently available in the VSCode Insiders release and will be available in next month's stable release.