microsoft / vscode

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

Scrolling Locked Misalignment - VSCode Insiders 1.88.0 #208538

Closed viniciusmi00 closed 6 months ago

viniciusmi00 commented 6 months ago

Type: Bug

There is an aligning issue in the recently released Scrolling Locked functionality in VSCode Insiders. When Scrolling Locked line-by-line alignment is enabled, when opening the search and/or search and replace box, the lines are misaligned.

The expected behavior is that the search and/or search and replace box, or no other box open in the editor, interferes with the text alignment.

Video:

https://github.com/microsoft/vscode/assets/14878542/c2ca2588-2ce4-4745-beda-843d084f722d

VS Code version: Code - Insiders 1.88.0-insider (409da0445d397e37a790ce5d2499688955c3fcfa, 2024-03-22T05:50:17.322Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i5-11400 @ 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| |Load (avg)|undefined| |Memory (System)|31.88GB (16.16GB free)| |Process Argv|--crash-reporter-id abaeac77-bacb-43b7-8589-f6bb98c9f0ab| |Screen Reader|no| |VM|0%|
Extensions (64) Extension|Author (truncated)|Version ---|---|--- op-vscode|1Pa|1.0.4 Bookmarks|ale|13.4.2 project-manager|ale|12.7.0 github-markdown-preview|bie|0.3.0 markdown-checkbox|bie|0.4.0 markdown-emoji|bie|0.3.0 markdown-footnotes|bie|0.1.1 markdown-mermaid|bie|1.22.0 markdown-preview-github-styles|bie|2.0.4 markdown-yaml-preamble|bie|0.1.0 npm-intellisense|chr|1.4.5 path-intellisense|chr|2.8.5 codestream|Cod|15.5.0 gitignore|cod|0.9.0 vscode-eslint|dba|2.4.4 docs-images|doc|1.0.1 docs-markdown|doc|1.0.7 gitlens|eam|2024.3.2405 vscode-html-css|ecm|2.0.9 EditorConfig|Edi|0.16.4 copilot-chat|Git|0.13.1 vscode-pull-request-github|Git|0.82.1 angular-bootstrap|her|4.0.9 output-colorizer|IBM|0.1.2 Angular2|joh|16.0.1 node-module-intellisense|lei|1.5.0 materialize-snippets|len|1.4.5 vs-color-picker|lih|1.0.0 git-graph|mhu|1.30.0 code-beautifier|mic|2.3.3 Angular-BeastCode|Mik|17.0.4 dotenv|mik|1.0.1 mongodb-vscode|mon|1.5.0 vscode-docker|ms-|1.29.0 vscode-language-pack-pt-BR|MS-|1.88.2024032009 csharp|ms-|2.22.5 vscode-dotnet-runtime|ms-|2.0.2 vscode-kubernetes-tools|ms-|1.3.15 data-workspace-vscode|ms-|0.5.0 mssql|ms-|1.22.1 sql-bindings-vscode|ms-|0.4.0 sql-database-projects-vscode|ms-|1.4.1 debugpy|ms-|2024.2.0 python|ms-|2024.2.1 remote-containers|ms-|0.352.0 remote-wsl|ms-|0.88.0 vsliveshare|ms-|1.0.5918 vscode-versionlens|pfl|1.9.2 vscode-yaml|red|1.14.0 LiveServer|rit|5.7.9 autoimport|ste|1.5.4 code-spell-checker|str|3.0.1 code-spell-checker-portuguese-brazilian|str|2.2.1 bootstrap4-vscode|the|6.1.0 terminal-tabs|Tyr|0.2.1 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.3.1 vscodeintellicode-completions|Vis|1.0.22 vscodeintellicode-insiders|Vis|1.1.10 vscode-icons|vsc|12.7.0 vscode-import-cost|wix|3.3.0 JavaScriptSnippets|xab|1.8.0 php-debug|xde|1.34.0 html-css-class-completion|Zig|1.20.0 (2 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 vsaa593:30376534 py29gd2263:30784851 c4g48928:30535728 vscrpc:30624061 962ge761:30841072 pythongtdpath:30726887 pythonidxpt:30768918 pythonnoceb:30776497 asynctok:30898717 dsvsc013:30777762 dsvsc014:30777825 dsvsc015:30821418 pythontestfixt:30866404 pythonregdiag2:30926734 pyreplss1:30879911 pythonmypyd1:30859725 pythoncet0:30859736 2e7ec940:30998029 pythontbext0:30879054 dsvsc016:30879898 dsvsc017:30880771 dsvsc018:30880772 d6fi2104:30968146 cppperfnew:30980852 d34g3935:30961436 fegfb526:30952798 bg6jg535:30979844 ccp2r6:30958154 pythonait:30973460 666c4381:30973073 7ghi1836:30988844 ```
benibenj commented 6 months ago

Thanks for reporting this. Opening the search widget causes some space to be reserved at the top of the editor pane for the widget. This causes the pane to scroll (can't be seen) and hence triggers scrolling on all other panes. I've got a fix for this

viniciusmi00 commented 5 months ago

@benibenj Hi,

Testing VSCode Insiders - d994aede3529..., I noticed that the resolution (#208893) generated a new bug.

Page scrolling and sync broke when opening the search widget in both editors (2 search widgets). It's only scrolling up (even though you're scrolling down), and with a smooth scroll in mouse, the editor scrolls up thousands of lines. Also when using the "Go To Row/Column" command (Ctrl + G), with the search widget open in both editors, the command does not go to the informed line.

It seems that the bug occurs when opening the second search widget, in any of the editors, as it misaligns the lines soon when opening the second widget. The problem lies in this. When only have one search widget open, everything works fine.

Again I made a video to demonstrate it. Video:

https://github.com/microsoft/vscode/assets/14878542/45a83ec3-0d28-4634-b08a-4c1c0fdbfbb9

Information about what I did in the video I am using line number 40,000 as a reference. When having the search widget open in just one of the editors, any of them, syncing and scrolling works fine. Go To Row/Column too.

When opening the second search widget in any of the editors, the bug occurs. Breaks sync and scrolling. Note that it only scrolls up, and skips thousands of lines with a smooth scroll (it was supposed to skip a few lines). It also breaks the Go To Row/Column, it does not go to the informed line.

Note: This time I'm testing on macOS (Sonoma 14.4.1), and the video was made on it. My VSCode is in Brazilian Portuguese.

Do I need to open a new issue to report this bug, or can I report it right here?

Thank you for correcting these errors, it is an excellent feature.

benibenj commented 5 months ago

@viniciusmi00 I also noticed this bug. I created a fix for it but it's not yet in insiders

viniciusmi00 commented 5 months ago

@viniciusmi00 I also noticed this bug. I created a fix for it but it's not yet in insiders

Just to add, some (many) times when using horizontal page scrolling with Scrolling Locked activated, VSCode is freezing and have to restart it or wait. When I wait, I am thrown to line 1 of the editors.

If you can, take advantage and do some tests in this sense on large files (if necessary, I can provide one that I'm working on, it's public).

@benibenj, If it is not possible to fix this for now, perhaps it would be better to return it as it was, because although it misaligned when opening one of the search widgets, all you had to do was open both and it would be aligned again, and there was no performance problem with horizontal scrolling and these other problems I reported. See what you can do for now to be better for us.