Skip to content

Nested Code folding not working correctly #4242

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

Closed
DanTup opened this issue Nov 3, 2022 · 2 comments
Closed

Nested Code folding not working correctly #4242

DanTup opened this issue Nov 3, 2022 · 2 comments
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Nov 3, 2022

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.

@DanTup DanTup added is bug in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server labels Nov 3, 2022
@DanTup DanTup added this to the v3.54.0 milestone Nov 3, 2022
@DanTup DanTup changed the title Code folding not working correctly for classes Nested Code folding not working correctly Nov 3, 2022
@DanTup DanTup added the relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available label Nov 3, 2022
@DanTup
Copy link
Member Author

DanTup commented Nov 3, 2022

copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Nov 3, 2022
…mode

Fixes Dart-Code/Dart-Code#4242.

Change-Id: Id2dd55085ed02879c2dcf581a5f4164e0df6b1c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
@DanTup
Copy link
Member Author

DanTup commented Nov 3, 2022

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

@DanTup DanTup closed this as completed Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features in lsp/analysis server Something to be fixed in the Dart analysis server is bug relies on sdk changes Something that requires changes in the Dart/Flutter SDK to ship before it will become available
Projects
None yet
Development

No branches or pull requests

1 participant