You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using #region and #endregion in developing PowerShell code, there is a difference in how code collapse works in ISE vs. VS Code. In ISE, collapsing a region will also hide the endregion line. In VS Code, it will not. This leads to extraneough lines when trying to collapse all regions for easier code viewing.
PowerShell Version
Name Value---- -----PSVersion 7.4.3PSEdition CoreGitCommitId 7.4.3OS Darwin 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:04 PDT 2024; root:xn…Platform UnixPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}PSRemotingProtocolVersion 2.3SerializationVersion 1.1.0.1WSManStackVersion 3.0Name : Visual Studio Code HostVersion : 2024.2.2InstanceId : 299e7431-e53b-4bb8-b868-133a1dd5f18cUI : System.Management.Automation.Internal.Host.InternalHostUserInterfaceCurrentCulture : en-USCurrentUICulture : en-USPrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxyDebuggerEnabled : TrueIsRunspacePushed : FalseRunspace : System.Management.Automation.Runspaces.LocalRunspace
Thanks for the submission! It's certainly something we should look into in terms of the grammar, because the standard with other languages appears to fold that end part inwards. At the very least we should have a configurable option ideally if it's not a hard-baked grammar rule thing.
Prerequisites
Summary
When using
#region
and#endregion
in developing PowerShell code, there is a difference in how code collapse works in ISE vs. VS Code. In ISE, collapsing a region will also hide theendregion
line. In VS Code, it will not. This leads to extraneough lines when trying to collapse all regions for easier code viewing.PowerShell Version
Visual Studio Code Version
Extension Version
v2024.2.2
Steps to Reproduce
Write a region in a PowerShell script within VS Code, example:
When collapsing the region, it will show two lines, not 1
Visuals
Logs
No response
The text was updated successfully, but these errors were encountered: