Repository: vscode
Issue: Editor sticky scroll rendering error
Labels: editor-sticky-scroll

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No   (not tested at this time)

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
Version: 1.96.4 (user setup)
Commit: cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba
Date: 2025-01-16T00:16:19.038Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631

Steps to Reproduce:

1.   You must have a document which triggers sticky-scroll while scrolling, you must use the mouse to position the view scroll bar specifically, and a region of the document that triggers sticky-scroll must specifically end in the scrolled state with blank lines between it and the next region.

![Image](https://github.com/user-attachments/assets/e9691681-e6a3-498e-910f-ae09b0f03764)

Note how line 121 is partially scrolled within the sticky scroll area.  Sometimes only the bottom pixel or two of the last line will be visible.  Doesn't matter how many lines total are in the sticky scroll.  It can be just one line.

Note the blank line at the end of the region and the fact the region ends indented seems to be important, as is scrolling specifically with the mouse dragging the scroll bar to maximize the rendering error when the blank line after the region is effectively at the top but only about 1 pixel of it is showing.  (Note line 54 is included below for completeness of what is seen in the issue image above...)

``` cpp
constexpr CFG_CONSTANT_DATA_SJAR_LaRPairs_List_Struct
    SJAR_LaRPairs_A109_4_RM_STD = LaRPairs_List(5,
                                                {{5400, 305}, // 45 feet
                                                 {6000, 353}, // 50 feet
                                                 {6600, 425}, // 55 feet
                                                 {11040, 720}, // 92 feet
                                                 {10560, 720}}), // 88 feet, special 109 reach limit for CCC, 500lbs no water
                                                                 // based on 500lbs /w water calibration ** needs update

```
The file containing this code is about 610 lines long, and the length may have an effect as to how well the rendering issue shows up.