Space being added in copy-and-paste.

Chaps, consider the following trivial snippet:

            int i = 2;
            if(i == 2)
            {
                i = 4;
            }
            if (i == 2)
            {
                i = 4;
            }

The first "if" statement respected my setting of not adding a space between the "if" and the opening bracket. I then selected the "if" statement and copy-and-pasted it into the code. RS6 then added a space between the "if" and the bracket. I've had some odd things happen in the past but is that space addition during copy-and-paste something I can control in a setting somewhere? I recently downloaded RS6 with a view to upgrading my RS5 licence so I was testing this space as its been puzzling me on and off for a while.

2 comments

Hello Peter,

Actually it's Visual Studio that does automatic formatting on paste. In order
to avoid this behavior just turn off 'Automatically format...' options under
Tools | Options | Text Editor | C# | Formatting | General. Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

copy



0

Aha! Thanks Andrey. C&P works ok now.

0

Please sign in to leave a comment.