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 a hash table is defined inside a function (whether a single- or multi-line definition), folding the function causes the fold to stop at the end of the hash table block rather than the end of the function block.
Reproducing the Issue
Open the code below as a PowerShell script.
Make sure configuration option "powershell.codeFolding.showLastLine" is set to true.
Move the cursor to the function statement on line 3 and press <Ctrl>+<Shift>+[ (on Windows) to fold the whole function. Note that the fold ends at line 23 rather than line 28 as expected.
Unfold the function line (<Ctrl>+<Shift>+] on Windows)
Move the cursor to the hash table definition on line 18 and fold the multi-line definition. Note that the fold swallows the closing line 23 as well as the blank line 24 below it.
Put only the hash table definition in its own file (see code below). Note that nothing is marked as foldable and the keyboard or palette commands do nothing.
Issue Description
When a hash table is defined inside a function (whether a single- or multi-line definition), folding the function causes the fold to stop at the end of the hash table block rather than the end of the function block.
Reproducing the Issue
<Ctrl>+<Shift>+[
(on Windows) to fold the whole function.Note that the fold ends at line 23 rather than line 28 as expected.
<Ctrl>+<Shift>+]
on Windows)Note that the fold swallows the closing line 23 as well as the blank line 24 below it.
Code:
Bonus Issue Test
Note that nothing is marked as foldable and the keyboard or palette commands do nothing.
Code:
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
The text was updated successfully, but these errors were encountered: