Skip to content

Bug: Broken Paste logic #1548

Description

@CookedMelon

Environment:

  • VS Code Version:1.105.1
  • Extension Version:0.30.5
  • JDK Type & Version:java 21.0.4
  • OS Type & Version: Windows, Linux

Step to Reproduce:

Create a file like test.java, the content is:

class test {
    private String function () {
        String a = "555\n555";
        a = "ggg";
        return a;
    }
}

Scenario A (Selection Paste): Use the mouse to select the \n characters (inside the double quotes), copy them, and attempt to paste them.

Scenario B (Line Copy/Paste): Place the cursor anywhere inside the double quotes (on the line String a = "\n";) without selecting any text. Use the VS Code shortcut Ctrl + C then Ctrl + V (intended to duplicate the entire line).

Expected Behavior:

Scenario A

Before Paste

Image

After Paste

Image

Scenario B

Before Paste

Image

After Paste

Image

Actual Behavior:

Scenario A

Image

What fxxk???

Scenario B

If I place the cursor inside the double quotes

Image

I press ctrl c & ctrl v

Image

What fxxk????????????

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions