Byron Sommardahl
Byron Sommardahl

Reputation: 13012

Why doesn't visual studio do anything when I press CTRL-Z the first time?

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.

Upvotes: 2

Views: 9413

Answers (3)

Kenneth Cochran
Kenneth Cochran

Reputation: 12114

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.

Upvotes: 0

Edgar Hernandez
Edgar Hernandez

Reputation: 4030

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.

Upvotes: 0

Andrew Hare
Andrew Hare

Reputation: 351758

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.

Upvotes: 4

Related Questions