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
At least in top-level functions, code folding can sometimes be unavailable. For example, I might be able to fold a function signature, but not the implementation block (and some but not all blocks within). While this is difficult to describe, it is most easily observed through reproduction or the videos below.
The issue does not appear to happen in Android Studio, so I'm guessing this is not an SDK issue (though VSCode can fold parameter lists, while Android Studio cannot--I'm not sure if this is intended).
Open run_hot.dart (packages/flutter_tools/lib/src)
Fold all code. This can be done by opening the command palette (Cmd/Ctrl+Shift+P) and typing Fold All.
You should see multiple unfolded blocks of code. As a specific example, the body _defaultReassembleHelper won't be folded, and for loops within might not be folded as well. See screenshots below.
Expected behavior
All code blocks should be folded after issuing a Fold All command. Interestingly, copying the contents of the file into a new editor and then using Fold All appears to work as expected. However, saving the file (say, to my Desktop) will unfold the code, and if I try to Fold All again, it is still slightly broken.
Describe the bug
At least in top-level functions, code folding can sometimes be unavailable. For example, I might be able to fold a function signature, but not the implementation block (and some but not all blocks within). While this is difficult to describe, it is most easily observed through reproduction or the videos below.
The issue does not appear to happen in Android Studio, so I'm guessing this is not an SDK issue (though VSCode can fold parameter lists, while Android Studio cannot--I'm not sure if this is intended).
To Reproduce
Steps to reproduce the behavior:
_defaultReassembleHelperwon't be folded, andforloops within might not be folded as well. See screenshots below.Expected behavior
All code blocks should be folded after issuing a Fold All command. Interestingly, copying the contents of the file into a new editor and then using Fold All appears to work as expected. However, saving the file (say, to my Desktop) will unfold the code, and if I try to Fold All again, it is still slightly broken.
Screenshots
The issue happening in run_hot.dart
2022-08-25_10-39-03.mp4
The issue not happening if I copy and paste a problematic function into a new editor:
https://user-images.githubusercontent.com/9027551/186756680-939ba825-7c52-44da-9324-b183e5add931.mp4
The issue happening if I save the new file to disk:
https://user-images.githubusercontent.com/9027551/186756837-88813e9f-1048-409e-9d83-c8e4e06bf0c5.mp4
Please complete the following information:
I have reproduced this on Windows and another MacBook. Let me know if more information on those environments is needed.
(edit: typo)