Skip to content

Bug: Broken Paste logic #4305

@CookedMelon

Description

@CookedMelon

Using this extension causes issues with the copy function in VS Code.

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

Scenario B

If I place the cursor inside the double quotes

Image

I press ctrl c & ctrl v

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions