🧹 Refactor scroll implementation into OS-specific helper functions - #49
🧹 Refactor scroll implementation into OS-specific helper functions#49undivisible wants to merge 4 commits into
Conversation
Extracted Windows and macOS scrolling implementations into standalone OS-specific functions (`windows_scroll` and `mac_scroll`) to drastically reduce the complexity and length of the `scroll` dispatcher function. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Extracted Windows and macOS scrolling implementations into standalone OS-specific functions (`windows_scroll` and `mac_scroll`) to drastically reduce the complexity and length of the `scroll` dispatcher function. Fixes RUSTSEC-2026-0221 by updating `event-listener` to 5.4.2 in Cargo.lock. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Extracted Windows and macOS scrolling implementations into standalone OS-specific functions (`windows_scroll` and `mac_scroll`) to drastically reduce the complexity and length of the `scroll` dispatcher function. Fixes RUSTSEC-2026-0221 by updating `event-listener` to 5.4.2 in Cargo.lock. Co-authored-by: undivisible <136312656+undivisible@users.noreply.github.com>
Keep only the OS-specific scroll helper extraction.
🎯 What: The
scrollfunction insrc/lib.rswas 81 lines long due to heavy#cfgconditionals mixing macOS, Windows, and Linux logic into a single method body.💡 Why: Splitting this logic into discrete
windows_scrollandmac_scrollhelper functions drastically simplifies the mainscrolldispatch block, enhancing readability and isolating OS-specific code paths, which improves maintainability.✅ Verification: Validated that functionality is logically equivalent, confirmed no new issues were introduced via
cargo check,cargo fmt,cargo clippy, and verified successfully against the local unit test suitecargo test --lib.✨ Result: The
scrollfunction is now clean, readable, and properly delegates to its newly extracted OS-specific counterparts.PR created automatically by Jules for task 6718624537651276967 started by @undivisible
Note
Low Risk
Mechanical move of platform scroll code with no intended behavior change; Linux path untouched.
Overview
Refactors native scroll input so Windows and macOS logic live in dedicated helpers instead of a long inline
scrollmethod.windows_scrollandmac_scrollhold the existingSendInput/ Core Graphics scroll-wheel behavior unchanged.NativeRuntime::scrollnow only dispatches to Linux (native_scroll),windows_scroll, ormac_scrollbehind the same#[cfg]gates as before.Reviewed by Cursor Bugbot for commit 70ddf73. Configure here.