maptz.vscode.extensions.customfolding icon indicating copy to clipboard operation
maptz.vscode.extensions.customfolding copied to clipboard

Region folding: collapse default not working as expected with nested regions

Open MaxDesignFR opened this issue 1 year ago • 0 comments

Issue: the "parent" region will also collapse if it contains at least one nested collapsed region. This results in all regions collapsing, even when the parent region does not have the "collapsed" identifier.

Here is an example of nesting where even the parent region collapse with cmd Region folding: collapse default #region

image

These are the settings I use:

"maptz.regionfolder": {
    "collapseDefaultRegionsOnOpen": true,
    "[css]": {
      "foldStart": "/* #region [NAME] */",
      "foldEnd": "/* #endregion */",
      "foldStartRegex": "^[\\s]*/\\*[\\s]*#region[\\s]*(.*)",
      "foldEndRegex": "/\\*[\\s]*#endregion",
      "defaultFoldStartRegex": "^[\\s]*/\\*[\\s]*#region[\\s]*\\(collapsed\\)[\\s]*(.*)"
    }
  }

MaxDesignFR avatar Apr 18 '23 19:04 MaxDesignFR