Skip to content
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

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

Open
1 of 3 tasks
TinnyTerr opened this issue Mar 23, 2025 · 0 comments
Open
1 of 3 tasks

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

TinnyTerr opened this issue Mar 23, 2025 · 0 comments
Labels
A-Formatter Area: formatter A-LSP Area: language server protocol S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@TinnyTerr
Copy link

TinnyTerr commented Mar 23, 2025

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.
@ematipico ematipico transferred this issue from biomejs/biome-vscode Mar 28, 2025
@ematipico ematipico added A-Formatter Area: formatter A-LSP Area: language server protocol S-Bug-confirmed Status: report has been confirmed as a valid bug labels Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter A-LSP Area: language server protocol S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

No branches or pull requests

2 participants