Skip to content

🐛 Code deleted when pasting with format on paste enabled #5489

Open
@TinnyTerr

Description

@TinnyTerr

VS Code version

1.98.2

Extension version

2.3.2

Biome version

1.9.4

Operating system

  • Windows
  • macOS
  • Linux

Description

When format on copy is enabled, a line is removed completely when pasting.

With my attempts, any file, only ones with pre-existing content, loses this line when pasting. The comment seems to be the issue as it doesn't happen without.

See here for demonstration:
https://r2.e-z.host/7fc132b6-0e3d-4fa9-b387-c8610f2f9179/omj9qk6nrrq8k50.mp4

Steps to reproduce

  1. Enable format on copy and ensure biome is default formatter
  2. Copy code
  3. Go to a TS or JS file
  4. Paste code
  5. Line missing after formatting.

Expected behavior

I expect the file to format properly, or at least not lose a line I paste.

Does this issue occur when using the CLI directly?

Not sure / Not applicable

Link to a minimal reproduction

https://github.com/TinnyTerr/biome-repro-1742737422403/ (Probably N/A)

Logs

None output during paste in output. Last output was the connection at 13:43, which is before when the video in the description starts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-FormatterArea: formatterA-LSPArea: language server protocolS-Bug-confirmedStatus: report has been confirmed as a valid bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions