zachflower / vscode-uncrustify

Uncrustify code formatter extension for Visual Studio Code
MIT License
7 stars 4 forks source link

Replace text works not properly #10

Open szymonPJO opened 2 years ago

szymonPJO commented 2 years ago

When replace text in vscode, some files are duplicated to each other. The duplicate doing after replece text

vscode 1.66.2

Natste commented 2 years ago

Also experiencing this issue in vscode v. 1.68.1.

Files are overwritten both when using find and replace and when using the Rename Symbol command. Overwritten in this context means that the contents of all files containing a match will be replaced with the contents of the file that has focus.

Luckily I've only had this happen on a handful of files at a time, as I imagine this issue could cause major problems for someone if it occurred on a large quantity.

Not sure if it has something to do with my setup, but I have disabled all other extensions to narrow down what was happening. The issue persists and is easily replicated with only this extension enabled: just use Rename Symbol or replace all for any string that appears in multiple files.

I don't think this was always an issue, so perhaps it has something to do with one of the configuration options.

Kristallfee commented 2 years ago

I have the same problems. I think it is connected to try to format several files at the same time.

geoffdudds commented 1 year ago

I'm also experiencing this. It renders the (otherwise very nice :)) extension not usable.

szymonPJO commented 1 year ago

The issue (still) happening when formatOnSave is turned on, best solution I found is use format toggle and refactoring when formatOnSave is off

UCSIG commented 1 year ago

I have the same problem with overwritten file content when replacing text across multiple files. Sadly, this means I can no longer use this extension

TonyWelte commented 1 year ago

I'm also affected by this issue and #16 . Disabling "Use Temp File" solved both issues for me

NanXiao commented 1 year ago

@TonyWelte

I'm also affected by this issue and https://github.com/zachflower/vscode-uncrustify/issues/16 . Disabling "Use Temp File" solved both issues for me

Just curious, is there any side-effect of disabling "Use Temp File"? Thanks in advance!

TonyWelte commented 1 year ago

@NanXiao none that I have noticed

NanXiao commented 1 year ago

@TonyWelte

@NanXiao none that I have noticed

Got it, thanks very much for your reply!