Auto-scroll when dragging to create range selection in staging view - #5855
Open
stefanhaller wants to merge 4 commits into
Open
Auto-scroll when dragging to create range selection in staging view#5855stefanhaller wants to merge 4 commits into
stefanhaller wants to merge 4 commits into
Conversation
stefanhaller
force-pushed
the
gocui-mouse-event-fixes
branch
from
July 25, 2026 16:13
7b7d524 to
1362313
Compare
stefanhaller
force-pushed
the
autoscroll-when-dragging-range-selection-in-staging-view
branch
from
July 25, 2026 16:14
adf5f23 to
ce69de0
Compare
stefanhaller
force-pushed
the
gocui-mouse-event-fixes
branch
from
July 26, 2026 05:57
1362313 to
398fb1a
Compare
stefanhaller
force-pushed
the
autoscroll-when-dragging-range-selection-in-staging-view
branch
from
July 26, 2026 06:02
ce69de0 to
da1e1f0
Compare
Add press/move/release primitives next to the existing Click. The test driver remembers the last reported position so a release doesn't have to repeat the coordinates, and RepeatMouseMove lets a test verify that a held-button motion event within the same cell has no effect.
It can be used to auto-scroll a view during drag gestures when the cursor reaches the edge of the view.
When the pointer reaches the edge of the view during a drag (or leaves the view entirely, which mouse capture makes possible), keep scrolling and extending the selection: slowly on the innermost edge row, faster on the outermost row, and very fast beyond. Scrolling starts after a short delay so that a drag merely passing near the edge doesn't scroll. When the view loses focus mid-drag (e.g. because a popup appeared), cancel the autoscroll and the mouse capture.
stefanhaller
force-pushed
the
gocui-mouse-event-fixes
branch
from
July 26, 2026 12:41
398fb1a to
32b5eb6
Compare
stefanhaller
force-pushed
the
autoscroll-when-dragging-range-selection-in-staging-view
branch
from
July 26, 2026 12:42
da1e1f0 to
966b3f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The staging view (and custom patch building view) already has the capability to create a range selection by dragging with the mouse; however, a longer range couldn't be selected this way because the dragging stopped at the view edge. Add auto-scrolling so that the view scrolls as the mouse reaches the view edge; slowly on the innermost edge row, faster
on the outermost row and beyond. Scrolling starts after a short delay so that a drag merely passing near the edge doesn't scroll.