Skip to content

🐛 Pasting code on an if statement after a comment line deletes the if statement #1004

@ramicohen303

Description

@ramicohen303

VS Code version

1.113

Extension version

3.6

Biome version

2.4.10

Operating system

  • Windows
  • macOS
  • Linux

Description

When I am trying to paste some text on part of an if statement that is right after a comment line, the entire if statement line is deleted.

Steps to reproduce

Example JS code:

let x = 0;

// This is the problem line
if (x === 0) {
x = 1;
}

Select a part of the if statement (for example, the x) and paste something.
Notice that the if statement is removed.
If no comment, no problem.

test.js

Expected behavior

Don't delete my code.

Does this issue occur when using the CLI directly?

Not sure / Not applicable

Link to a minimal reproduction

No response

Logs


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions