Bookmarks are erased after a code reformat for code that got a set of new lines

I have mentioned this problem more than a year ago so it's in the release and EAP versions. Once a while I lose my bookmarks after doing a code reformat. It happened today when I copied and inserted a few lines from and into the same file. The code was formatted before the insert. I like my braces in the next lines. I didn't a reformat do get the braces in the next lines. The cursor jumped to the top of the file. It seems when this happens, R# has no idea anymore where in the editor I was working and the boomarks are lost. I will try ctrl-shift-backspace next time and see if it works.

I would like Resharper to intercept (if possible) the copy/paste action and keep the formatting when pasting. The copied code was already formatting properly. This way I don't have to do a code reformat.

1 comment
Comment actions Permalink

Hello Abdu
     Thank you for reporting this problem! Have you tried turning off auto-format on paste option of Visual Studio (under Tools | Options | Text Editor | C# | Formatting)?

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

"Develop with pleasure!"


Please sign in to leave a comment.