Skip to content

Nested Code folding not working correctly #4242

@DanTup

Description

@DanTup

Noted by @methompson in #4121 (comment)

class MyClass {
  //
  method1(String a) {
    //
  }
  //
}
{
	"id": 202,
	"jsonrpc": "2.0",
	"result": [
		{
			"endLine": 1,
			"startLine": 0
		},
		{
			"endLine": 4,
			"startLine": 2
		}
	]
}

Here, the folding for the class goes from line 0-1 and doesn't actually cover the class at all. If you remove the first comment, it results in the folding for class not appearing at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions