Product: PowerShell Studio 2022 (64 Bit)
Build: v5.8.206
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.22000.0
Hello, as per subject I am facing a weird issue with regions. I have a foreach loop which I'm trying to enclose in a region problem is code is collapsed correctly when no region is present:
But as soon as I place a #region tag I am not able to fold neither the code nor the region itself
Weirdly enough this seems to affect only newly created regions, I already have plenty of them in my codebase and they're working as intended.
I have tried to leave couple of blank lines between the region definition and the code itslef but still issue persists, this seems to kick in when creating region with folded code (I have a hundred of so lines of code in between) which is automatically expanded and causing this to show itself.
I will try to reproduce this in a reliable way but that's what I observed in a rather consistent way on my end.
Thanks!
Issue with regions
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- PsCustomObject
- Posts: 137
- Last visit: Thu Mar 28, 2024 3:34 am
Re: Issue with regions
Can you please provide a screenshot of your Editor (Options->Editor) and Format (Options->Formatting) settings in Options:
Did you manually add the region or did you use the ribbon (Home->Edit->Regions)?
Did you manually add the region or did you use the ribbon (Home->Edit->Regions)?
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- PsCustomObject
- Posts: 137
- Last visit: Thu Mar 28, 2024 3:34 am
Re: Issue with regions
Thanks, I actually did both.
I tried manually adding the region but also used the built-in menu/keyboard shortcut, same result.
I'm attaching requested screenshots
I tried manually adding the region but also used the built-in menu/keyboard shortcut, same result.
I'm attaching requested screenshots
- Attachments
-
- Formatting2.png (27.36 KiB) Viewed 3410 times
-
- Formatting1.png (26.62 KiB) Viewed 3410 times
Re: Issue with regions
Upon formatting the script (Home->Edit), does this bring back the collapse/expand functionality for the regions?
Does this behavior persist after opening and closing the script?
Does this behavior persist after opening and closing the script?
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- PsCustomObject
- Posts: 137
- Last visit: Thu Mar 28, 2024 3:34 am
Re: Issue with regions
I just checked and both formatting and closing/re-opening the script (but the whole editor does not change) has no effect and issue seems to persist.
Re: Issue with regions
Is it just happening on a particular script or can you replicate it on any script?
Can you please upload a script with this behavior:
https://www.sapien.com/support/upload
Can you please upload a script with this behavior:
https://www.sapien.com/support/upload
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- PsCustomObject
- Posts: 137
- Last visit: Thu Mar 28, 2024 3:34 am
Re: Issue with regions
Apologies for the late reply, I think this was a temporary quirk with the code I was working on.
just ignore this and if I'm able to reproduce this consistently I will report back.
Thanks!
just ignore this and if I'm able to reproduce this consistently I will report back.
Thanks!