You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Autocomplete is triggered while writing a comment #3783
To Reproduce
I tried to isolate the issue in a separate file but I couldn't reproduce it even using the same set of imports. It's happening only in the file where the recording was taken.
Expected behavior
Autocomplete shouldn't be triggered when typing within a comment.
Is there any more content after the comment shown here? Any other differences you can see (line endings, trailing newlines, etc.?)
There is code that's supposed to prevent completion in comments, although there have been some edge cases with how comments at the end of the file are represented in the AST before.
If you make an exact copy of this file (not the content, but the file on disk) in a new project, does it occur there?
Activity
DanTup commentedon Jan 17, 2022
Is there any more content after the comment shown here? Any other differences you can see (line endings, trailing newlines, etc.?)
There is code that's supposed to prevent completion in comments, although there have been some edge cases with how comments at the end of the file are represented in the AST before.
If you make an exact copy of this file (not the content, but the file on disk) in a new project, does it occur there?
osaxma commentedon Jan 17, 2022
This should reproduce in a new empty file:
I guess because the comment is followed by a documentation comment (if removed, no issue).
DanTup commentedon Jan 17, 2022
I can repro, thanks!
[analysis_server] Suppress code completion in comments before dartdocs
DanTup commentedon Jan 19, 2022
Fixed by dart-lang/sdk@5455047. It's an SDK change so will show up in a future SDK release rather than a Dart-Code release.