zachflower / vscode-uncrustify

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

Copy Paste Duplication of entire document if "Use Temp File" setting is checked #16

Open Stratoscaster opened 1 year ago

Stratoscaster commented 1 year ago

Entire document will be pasted into itself if "Use Temp File" is checked and you copy/cut and then paste. The copy itself is not duplicated, it pastes as expected into other word processors, just when pasting back into the document. Ctrl+Z will then undo the entire document paste, and the expected result will be present.

Please note that "Use Temp File" being unchecked fixes the issue.

Steps to reproduce:

  1. Enable "Use Temp File" Setting
  2. Copy some text in any text document in VS Code
  3. Paste the text into the same document (or a different one)
  4. You will see the document pasted into itself
yguel commented 3 weeks ago

Thanks a lot I had the same problem. For future users having the problem: you can add

"uncrustify.useTempFile": false, 

in your settings.json