Skip to content
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

(GH-1458) Remove region folding from non-region areas #1467

Merged

Conversation

glennsarti
Copy link
Contributor

@glennsarti glennsarti commented Aug 6, 2018

PR Summary

Previously all of the folding ranges were either Region or Comment, however this
is confusing e.g. a Here String is neither a region or a comment. The VS Code
API does state that the range kind property is optional. This commit changes
the range kind for braces, parentheses and here strings to be null, that is,
neither a region or comment range. This makes editor commands like
'Fold All Regions' behave as a user expects.

Fixes #1458

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

Previously all of the folding ranges were either Region or Comment, however this
is confusing e.g. a Here String is neither a region or a comment.  The VS Code
API does state that the range kind property is optional.  This commit changes
the range kind for braces, parentheses and here strings to be null, that is,
neither a region or comment range. This makes editor commands like
'Fold All Regions' behave as a user expects.
@glennsarti glennsarti force-pushed the gh-1458-folding-kind-optional branch from 83dfaea to faf5f70 Compare August 6, 2018 01:34
@glennsarti glennsarti changed the title {WIP} (GH-1458) Remove region folding from non-region areas (GH-1458) Remove region folding from non-region areas Aug 6, 2018
Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Glenn! Awesome work 😊

Copy link
Collaborator

@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @glennsarti!

@TylerLeonhardt TylerLeonhardt merged commit 7892603 into PowerShell:master Aug 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Still having problems with Regions folding on 1.8.2
3 participants