microsoft / vscode

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

Side Scrollbar does not match scroll position in document #205420

Open jogibear9988 opened 7 months ago

jogibear9988 commented 7 months ago

Type: Bug

Open a large document (for example a diff view of packagelock.json via source control). No look for some highlight markers in the scrollbar. These do not match the scrolled position in the document.

See in the screenshot, the diffs should be at the end of the view (according to scrollbar) but they are at the beginning.

Screenshot:

image

In the next screenshot, the diffs should be in the middle, but they are not even visible:

image

slider mode:

image

but it also happens in mode "fit"

VS Code version: Code - Insiders 1.86.0-insider (Universal) (72cb92fdc5d08101d65d59e4b1c046d397896dd2, 2023-12-12T05:37:56.079Z) OS version: Darwin arm64 23.1.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Max (10 x 24)| |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
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|5, 4, 4| |Memory (System)|32.00GB (0.06GB free)| |Process Argv|--crash-reporter-id 42715b90-8f12-4d70-80b0-8d83b5e08ba7| |Screen Reader|no| |VM|0%|
Extensions (13) Extension|Author (truncated)|Version ---|---|--- githistory|don|0.6.20 vscode-jest-runner|fir|0.4.72 serenity-dsl-syntaxhighlight|kle|0.3.1 vscode-clangd|llv|0.1.26 git-graph|mhu|1.30.0 csdevkit|ms-|1.4.2 csharp|ms-|2.18.15 vscode-dotnet-runtime|ms-|2.0.1 vscodeintellicode-csharp|ms-|0.1.26 vscode-designer-addon|nod|1.1.9 indent-rainbow|ode|8.3.1 vscode-pets|ton|1.25.1 pretty-ts-errors|Yoa|0.5.3
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 vsaa593:30376534 py29gd2263:30784851 c4g48928:30535728 pythongtdpath:30726887 welcomedialog:30812478 pythonidxpt:30768918 pythonnoceb:30776497 asynctok:30898717 dsvsc013:30777762 dsvsc014:30777825 dsvsc015:30821418 pythontestfixt:30866404 pythonregdiag2:30926734 pyreplss1:30879911 pythonmypyd1:30859725 pythoncet0:30859736 pythontbext0:30879054 accentitlementst:30870582 dsvsc016:30879898 dsvsc017:30880771 dsvsc018:30880772 fegfb526:30945144 bg6jg535:30946824 ```
IllusionMH commented 7 months ago

There are minimal heights for preview window and diffs, so it won't be precise on huge files as package-lock.json as it would be unusable small.

jogibear9988 commented 7 months ago

It's not a little bit offset, and not only on very big files. Why should it not be possible to calculate this correctly? Se here a stylesheet with 3000 LOC in monaco editor:

image image

in the upper screenshot the error should be in the middle, but it is in the lower screenshot, where the error should be at the lower end

jogibear9988 commented 7 months ago

Maybe the scroll thumb size needs to be adjusted accoding to view size?