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

Pasting lines duplicates the first subsequent code element #381

Closed
astrocreep opened this issue Sep 12, 2019 · 3 comments
Closed

Pasting lines duplicates the first subsequent code element #381

astrocreep opened this issue Sep 12, 2019 · 3 comments
Labels

Comments

@astrocreep
Copy link

If you paste more a complete line (or more), the first subsequent element is duplicated. No matter if this is in braces, newline or whatever.

var x = 1;
var z = 3

Now you paste something between the two lines the result will be:

var x = 1;
var y = 2;
var    var z = 3;

This is 100% reproducable on my current setup:
Win 10
VSCode 1.18.1
vshaxe 2.16.0

@Gama11
Copy link
Member

Gama11 commented Sep 12, 2019

I'm guessing you have "editor.formatOnPaste" active? Until recently that wouldn't have had any effect with Haxe, but in 2.16.0 we added support for range formatting.

We found a bug that looks very much looks this shortly after release, so chances are this is already fixed on the haxe-formatter side.

@astrocreep
Copy link
Author

You are right! "editor.formatOnPaste" was active. Deactivating it fixes the code duplication. Looking forward for a proper fix to reenable formating on paste.

@Gama11
Copy link
Member

Gama11 commented Sep 12, 2019

I can confirm that a haxe-formatter update fixes this.

@Gama11 Gama11 added the bug label Sep 12, 2019
@Gama11 Gama11 closed this as completed in 601c100 Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants