Bug: A folded method also hides empty lines after it
See original GitHub issue- VSCode Version: 1.25.1
- OS Version: Ubuntu 18.04.1 LTS
Steps to Reproduce:
- In a c# file (or cshtml file)
- Fold a method
- It will be folded, along with empty lines after it
Example before folding:
public void foo() {
// some code...
}
// this empty line will be hidden when folding "foo()"
// this empty line will be hidden when folding "foo()"
// this empty line will be hidden when folding "foo()"
// this empty line will be hidden when folding "foo()"
public string Bar { get; set; }
Example after folding:
public void foo() { ...
public string Bar { get; set; }
Example of what should occur:
public void foo() { ...
// this empty line was not folded
// this empty line was not folded
// this empty line was not folded
// this empty line was not folded
public string Bar { get; set; }
I’ve marked this as a bug, rather than a request, because this is not how folding works with Visual Studio - which only folds code, not whitespace after it. And I assume you’re aiming for parity with the IDEs, at least for c# anyway.
This is a really annoying problem, because when code is folded everything is bunched up together and you can’t visually separate between them - which is why you’d use empty lines between them.
(The same problem exists for .cshtml
files.)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Bug: A folded method also hides empty lines after it (#55304)
In a c# file; Fold a method; It will be folded, along with empty lines after it ... I've marked this as a...
Read more >Including blank lines following region in fold - Stack Overflow
I'm currently attempting to improve the folding behavior of Matlab files in Vim. I have a syntax file generated and the folding behaves...
Read more >513821 – [formatter] Blank lines at beginning of method body ...
Generally, "Blank lines" settings are meant to add blank lines if missing, not to remove existing ones if there are too many (hence...
Read more >v3.20 on Windows not showing empty lines - meld - GitLab
Using Meld 3.20.2 Windows (current latest MSI) When diffing two files that have blank lines, those blank lines aren't shown.
Read more >separating folds with constant amount of newlines
I'm using fold by indent. The goal is two visible blank lines between each fold (actually, after the end of a fold, since...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is fixed - closing.
Before fold:
After fold:
@lonix1 This should be fixed in our next release.