Skip to content

Folding incorrect #1313

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

Closed
DarkLite1 opened this issue May 7, 2018 · 2 comments
Closed

Folding incorrect #1313

DarkLite1 opened this issue May 7, 2018 · 2 comments

Comments

@DarkLite1
Copy link

DarkLite1 commented May 7, 2018

System Details

  • Operating system name and version: Windows Server 2012R2
  • VS Code version: 1.24-0-insider
  • PowerShell extension version: 1.7.0
  • Output from
Name                           Value
----                           -----
PSVersion                      5.1.14409.1012
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.1012
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1:

Issue Description

I am experiencing a problem with the folding of code. Now that the new API allows language aware folding, it would be nice if this could be folded correctly:

$ThresholdTest = @(
    @{
        Percentage = 85
        Color      = 'Red'
        Action     = @{
            MailTo           = '[email protected]'
            Subject          = "Your personal home drive has reached [Quota Threshold]% of its maximum allowed volume"
            Body             = @"
Dear [Source Io Owner],

Your personal home drive has reached [Quota Threshold]% of its 
"@
            Type             = 2
            RunLimitInterval = 2880
        }
    },
    @{
        Percentage = 100
        Color      = 'Green'
        Action     = @{
            MailTo           = '[email protected]'
            Subject          = 'Your personal home drive has reached or exceeded its maximum allowed volume'
            Body             = @"
Dear [Source Io Owner],

Your personal home drive has now reached [Quota Threshold]% of its maximum allowed volume.
"@
            Type             = 2
            RunLimitInterval = 2880
        }
    }
)

When clicking CTRL+K CTRL+O it looks like this:
image

@rkeithhill
Copy link
Contributor

Duplicate of #177. The plan is to add this support. Keep in mind the VSCode API to support this - just shipped in 1.23.

@DarkLite1
Copy link
Author

Awesome, thank you @rkeithhill

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

No branches or pull requests

2 participants