microsoft / vscode

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

After updating Visual Studio Code, smooth scrolling stopped working when the editor zoom level is set to 125%. Resetting the zoom level to 100% resolves the issue, but the problem reoccurs when returning to 125%. #225127

Open ggglv opened 3 months ago

ggglv commented 3 months ago

Type: Bug

Problem Description:

After updating Visual Studio Code, smooth scrolling stopped working when the editor zoom level is set to 125%. Resetting the zoom level to 100% resolves the issue, but the problem reoccurs when returning to 125%.

Steps to Reproduce:

  1. Ensure the following settings are applied:
    {
        "editor.accessibilityPageSize": 14,
        "editor.fontLigatures": false,
        "editor.mouseWheelScrollSensitivity": 2,
        "workbench.list.mouseWheelScrollSensitivity": 2,
        "editor.fontFamily": "Consolas, Cascadia Code, SF Mono, 'Courier New', monospace",
        "workbench.colorTheme": "One Dark Pro",
        "go.toolsManagement.autoUpdate": true,
        "workbench.list.smoothScrolling": true,
        "editor.smoothScrolling": true,
        "terminal.integrated.smoothScrolling": true,
        "editor.cursorSmoothCaretAnimation": "on",
        "editor.cursorBlinking": "phase",
        "editor.fontSize": 15
    }
  2. Set the editor zoom level to 125% using Ctrl + = or View > Appearance > Zoom In.
  3. Try scrolling in the editor.

Expected Behavior: Smooth scrolling should work correctly at 125% editor zoom level.

Actual Behavior: Smooth scrolling is enabled but does not work in both the text editor and the terminal. Scrolling is jerky, as if smooth scrolling is disabled.


VS Code version: Code 1.92.0 (b1c0a14de1414fcdaa400695b4db1c0799bc3124, 2024-07-31T23:26:45.634Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 7 7700 8-Core Processor (16 x 3793)| |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)|31.12GB (22.28GB free)| |Process Argv|--crash-reporter-id 86bd4393-7587-4504-9ade-2d5657101880| |Screen Reader|no| |VM|0%|
Extensions (3) Extension|Author (truncated)|Version ---|---|--- go|gol|0.42.0 vscode-language-pack-ru|MS-|1.92.2024080709 material-theme|zhu|3.17.2
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vstes627:30244334 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 pythonnoceb:30805159 asynctok:30898717 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 g316j359:31013175 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 dwnewjupyter:31046869 impr_priority:31102340 refactort:31108082 ccplti:31103428 pythonrstrctxt:31103193 wkspc-onlycs-t:31111718 ```
mr-saad commented 3 months ago

agreed

Chrysaloid commented 3 months ago

I've found a workaround that might work for some people:

If you enable editor.mouseWheelZoom you can set the window.zoomLevel to 100% (which isn't that bad)(which is called 0 in the settings and 125% is actually 120% and is called 1) and then enlarge the editor font with Ctrl + MouseWheelUp.

I think I'll stay that way permanently, because I can now see more tabs LOL

arif456 commented 1 month ago

Thank you a ton. Had no idea that 125% scale had to do anything with scrolling, but just checked and it was in fact true in my case too. Very weird bug.

asifrahaman13 commented 1 month ago

In my case

"window.zoomLevel": 1

caused no smooth scroll. but whenever I changed this to floating point number above 1 it worked.

"window.zoomLevel": 1.01,

Strange bug.