views:

41

answers:

3

Maybe it's only this way in my instance, but maybe not. When I'm editing an ASPX file in Visual Studio 2008 and I press CTRL-Z to undo, nothing happens. Then I press CTRL-Z a second time and it does what it's supposed to do.

There is a flicker the first time I undo, so maybe something IS happening. Maybe it's by design and I should be happy it's undo-ing that first thing.

+2  A: 

Whenever Visual Studio does any auto-formatting it saves that formatting step in the undo history (thus allowing you to undo the auto-formatting step if you so choose). Most likely the first undo is undoing that auto-formatting step.

Andrew Hare
A: 

I believe I have never seen that behavior, or at least never have noticed it. But if that is true, it could have been eliminating some designer code or info that you haven't noticed.

I have tested it in my current project and it works as expected. Sorry not being of more help.

Limo Wan Kenobi
A: 

I've seen this behavior when undoing tool-assisted refactoring. Usually its either undoing a change in an associated file or elsewhere in the currently visible file. An example would be referencing a class that requires adding another 'using' clause to the current file. Undoing the change would remove the 'using' clause before removing the class name I typed.

codeelegance