Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: A folded method also hides empty lines after it #55304

Closed
lonix1 opened this issue Jul 28, 2018 · 6 comments
Closed

Bug: A folded method also hides empty lines after it #55304

lonix1 opened this issue Jul 28, 2018 · 6 comments
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@lonix1
Copy link

lonix1 commented Jul 28, 2018

  • VSCode Version: 1.25.1
  • OS Version: Ubuntu 18.04.1 LTS

Steps to Reproduce:

  1. In a c# file
  2. Fold a method
  3. 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; }

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 buched up together and you can't visually separate between them - which is why you'd use empty lines between them.

@vscodebot
Copy link

vscodebot bot commented Jul 28, 2018

@vscodebot vscodebot bot added editor editor-folding Editor code folding issues labels Jul 28, 2018
@kieferrm
Copy link
Member

I'm guessing you have the C# extension installed.

@kieferrm kieferrm added *caused-by-extension Issue identified to be caused by an extension and removed editor editor-folding Editor code folding issues labels Jul 30, 2018
@vscodebot
Copy link

vscodebot bot commented Jul 30, 2018

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Jul 30, 2018
@lonix1
Copy link
Author

lonix1 commented Jul 30, 2018

@kieferrm I use c# yes. I don't understand - isn't this a problem with the IDE?

@kieferrm
Copy link
Member

@lonix1 VS Code out of the box does not have any deep C# knowledge. If you have the C# extension installed, the C# extension provides VS Code with the knowledge about which ranges are folding ranges. Thus, the issue you describe is with the extension, not with VS Code proper.

@lonix1
Copy link
Author

lonix1 commented Jul 31, 2018

@kieferrm Thanks I get it now

@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

2 participants