Skip to content

Format document sometimes adds blank newlines between every line #4865

Closed
@DanTup

Description

@DanTup

I've seen this a couple of times in the last few days:

format.mp4

My feeling is that it's related to having a document that is mostly LF but then you add some CRLF (for example during a merge conflict or pasting).

Here's a (zipped, to reduce the chance of anything messing with it) copy of the file from the video in the state that triggers it.

handler_execute_command.zip

And as I hit save, I reload VS Code to ensure it still occurs, but it does not. So probably there is some state involved and it's not just the file on disk. It's unclear if the issue is on the server or the client side.

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