This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
Smoothly autoscroll the editor when selecting with the mouse - #8548
Merged
Merged
Conversation
Contributor
|
🎇 |
added 3 commits
August 28, 2015 12:17
This was a spike and still needs tests, but it’s going to be way better.
nathansobo
force-pushed
the
ns-improve-mouse-based-autoscroll
branch
from
August 28, 2015 18:57
5a9a666 to
012f8e4
Compare
Contributor
Author
|
@izuzak any interest in playing with this? I may merge it once it's green and we can adjust it from there if needed. |
Contributor
|
@nathansobo Just took it for a test 🚗 and it looks and feels great! Didn't notice any problems so far ⚡ |
nathansobo
pushed a commit
that referenced
this pull request
Aug 28, 2015
Smoothly autoscroll the editor when selecting with the mouse
Contributor
Author
|
Thanks for testing it. 🙇 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #8539
Fixes #6722
Our current approach to autoscrolling when selecting with the mouse relies on the same code path as our keyboard-based autoscrolling. This makes it feel jerky and also makes it especially hard to control at small editor sizes.
This PR uses a different code path to autoscroll when selecting with the mouse, providing a smoother and more controlled experience. The scroll speed is a quadratic function of the mouse cursor's distance beyond the edge of the editor viewport, and I'm open to adjusting the parameters if anyone wants to experiment or pull something from another codebase.