Skip to content

Nested Code folding not working correctly #4242

Closed

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.

Activity

  1. added
    in editorRelates to code editing or language features
    in lsp/analysis serverSomething to be fixed in the Dart analysis server
    on Nov 3, 2022
  2. added this to the v3.54.0 milestone on Nov 3, 2022
  3. changed the title [-]Code folding not working correctly for classes[/-] [+]Nested Code folding not working correctly[/+] on Nov 3, 2022
  4. added
    relies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
    on Nov 3, 2022
  5. DanTup commented on Nov 3, 2022

    @DanTup
    MemberAuthor
  6. DanTup commented on Nov 3, 2022

    @DanTup
    MemberAuthor

    Fixed by dart-lang/sdk@e417e3c, ships in the SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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