New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoscroll to cursor position after folding or unfolding #16092

Merged
merged 1 commit into from Nov 7, 2017

Conversation

Projects
None yet
2 participants
@nathansobo
Contributor

nathansobo commented Nov 3, 2017

When folding or unfolding large blocks, it is possible to move the cursor off screen. Whenever this happens it is annoying and confusing, so this PR changes all code paths that create or destroy folds to autoscroll to the cursor position afterwards.

There were several different fold/unfold code paths, so I decided to weave simple autoscroll assertions into the existing tests.

Autoscroll to cursor position after folding or unfolding
There were several different fold/unfold code paths, so I decided to
weave simple autoscroll assertions into the existing tests.

@nathansobo nathansobo requested a review from maxbrunsfeld Nov 3, 2017

@nathansobo nathansobo self-assigned this Nov 3, 2017

@nathansobo

This comment has been minimized.

Show comment
Hide comment
@nathansobo

nathansobo Nov 3, 2017

Contributor

I have no idea why Travis keeps failing it seems unrelated to me.

Contributor

nathansobo commented Nov 3, 2017

I have no idea why Travis keeps failing it seems unrelated to me.

@nathansobo nathansobo merged commit 6227ece into master Nov 7, 2017

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@nathansobo nathansobo deleted the autoscroll-after-fold-or-unfold branch Nov 7, 2017

nathansobo added a commit that referenced this pull request Nov 14, 2017

Revert "Merge pull request #16092 from atom/autoscroll-after-fold-or-…
…unfold"

This reverts commit 6227ece, reversing
changes made to 311055c.

nathansobo added a commit that referenced this pull request Nov 14, 2017

Auto-scroll after folding/unfolding via a command
In my previous attempt in #16092, I was autoscrolling in the TextEditor
methods themselves. But this could lead to undesirable autoscrolling
when folding with the mouse.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment