Open AArnott opened 1 year ago
Thank you for reporting. I have been trying to reproduce the issue (the second case) but I have not succeeded yet. Could you elaborate the way to reproduce the issue step by step? In addition, could you attach the .cs file used to reproduce the issue and the screenshot of settings of this extension?
Thanks for looking. Here are the settings:
And here is a video of the repro steps.
https://user-images.githubusercontent.com/3548/236703153-7f1b2a2c-49b4-427f-b642-e933a947b371.mp4
Notice how after I hit the Copy command, the selection is extended to include the extra line and characters that end up being included in the pasted text into Notepad (which I don't want).
I love this extension, but it suffers from a bug that many editor-selection based extensions suffer from, related to the line ending that may be included at the end of the selection.
In the following example, I've very carefully omitted the trailing line ending.
Then I execute the Trim Copy -> no indent command:
This produces the desired result:
But if I do things in a more natural way, by just selecting whole lines:
Notice the very subtle selection difference where the trailing line ending is included.
Now when I paste this into Notepad, not only is the indentation not removed, an extra line has been pasted at the end: