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

Preserve folds that are fully contained by the selection when changing selection ranges #15993

Merged
merged 3 commits into from Oct 25, 2017

Conversation

Projects
None yet
3 participants
@nathansobo
Contributor

nathansobo commented Oct 25, 2017

Fixes #15565
Depends on atom/text-buffer#272

Previously, whenever we changed the range of a selection, we destroyed all intersecting folds. This caused us to destroy even folds that the selection completely contained, which was a counter-intuitive behavior.

This PR upgrades to a new version of text-buffer containing a new destroyFoldsContainingBufferPositions method that takes an array of positions and destroys any folds containing one of these positions (exclusive of its endpoints). I also use the new method on some other code paths that only need to destroy folds intersecting individual points rather than ranges.

@nathansobo nathansobo requested a review from maxbrunsfeld Oct 25, 2017

@nathansobo nathansobo changed the title from Dont destroy contained folds to Preserve folds that are fully contained by the selection when changing selection ranges Oct 25, 2017

@nathansobo

This comment has been minimized.

Show comment
Hide comment
@nathansobo

nathansobo Oct 25, 2017

Contributor

/cc @ungb, @Ben3eeE for testing

Contributor

nathansobo commented Oct 25, 2017

/cc @ungb, @Ben3eeE for testing

@nathansobo nathansobo referenced this pull request Oct 25, 2017

Closed

Select all automatically unfolds any folded content #15565

1 of 1 task complete
@nathansobo

This comment has been minimized.

Show comment
Hide comment
@nathansobo

nathansobo Oct 25, 2017

Contributor

I'm going to go ahead and merge this because I just bumped from the pre-release of atom/text-buffer#272 to an identical official release.

Contributor

nathansobo commented Oct 25, 2017

I'm going to go ahead and merge this because I just bumped from the pre-release of atom/text-buffer#272 to an identical official release.

@nathansobo nathansobo merged commit 6e55b29 into master Oct 25, 2017

0 of 3 checks passed

ci/circleci Your tests are queued behind your running builds
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@nathansobo nathansobo deleted the dont-destroy-contained-folds branch Oct 25, 2017

@ungb

This comment has been minimized.

Show comment
Hide comment
@ungb

ungb Oct 25, 2017

Contributor

Looks good! 🚢 ... oh wait the ship as sail already!

Contributor

ungb commented Oct 25, 2017

Looks good! 🚢 ... oh wait the ship as sail already!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment