Two many press to undo

Answered

Hi

I'm not sure if this i VS or R#, but here is a thing that's been annoying me for a long time now.

I'm creating a method, and accidently presses [ (instead of {) and then enter, when I discover my error, I have to press ctrl+z 4 times to get a full undo.

But I only made 2 changes: pressing [ and enter, so I'm expecting to only have to press ctrl+z 2 times as well to get a full undo.

5 comments
Comment actions Permalink

Hello Karsten Kousgaard, thank you for your question. Please try disabling the following options:

- "ReSharper | Options | Environment | Editor | Behavior | Smart indent on enter";

- "ReSharper | Options | Environment | Editor | Behavior | Auto-insert pair brackets, parentheses and quotes";

- "Tools | Options | Text Editor | All Languages | General | Automatic brace completion".

0
Comment actions Permalink

But that's not a real solution.

If Resharper automatically does some action because of something I type, they are one unit and should be undone as "one unit". To me this is a bug or at least a missing feature.

0
Comment actions Permalink

Karsten Kousgaard, thanks for the reply. As far as we know, most users want exactly this behavior, because if a smart component ("Smart indent" or "Auto-insert pair brackets") behaves incorrectly, then there is no way to cancel only this component.

0
Comment actions Permalink

I see, perhaps this is the best way. I'll try to disable the smart/auto-behaviors and see how much I'll miss them  

0

Please sign in to leave a comment.