Skip to content

Code completion incorrectly returns results in comments at end of file #3170

@eseidel

Description

@eseidel

To Reproduce

  1. Open a new foo.dart file.
  2. Start typing a comment "// This is a test."
  3. Notice how you end up with "// This is a test.abstract\n".

Expected behavior
I would have expected typing return after the period to result in just a new line, not "abstract\n" added.

The autocomplete is just a bit aggressive inside comments (especially with nothing typed after the period).

Screenshots
autocomplete_bug

Versions (please complete the following information):

flutter doctor -v
[√] Flutter (Channel dev, 1.27.0-8.0.pre, on Microsoft Windows [Version 10.0.19041.804],
locale en-US)
• Flutter version 1.27.0-8.0.pre at C:\Users\micro\flutter
• Framework revision b7d4806243 (8 days ago), 2021-02-19 09:22:45 -0800
• Engine revision 6993cb229b
• Dart version 2.13.0 (build 2.13.0-30.0.dev)

[√] VS Code (version 1.53.2)
• VS Code at C:\Users\micro\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.16.0

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 bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions