"Undo" feature in Visual Studio 2008 stops working
Asked Answered
T

8

32

I'll be coding along in Visual Studio 2008, and eventually I make a mistake. I press CTRL - Z to undo and NOTHING HAPPENS. I'm not talking about anything complicated, like undoing a search and replace across multiple files that weren't open. I am talking about undoing a cut & paste action, or simply the typing of text.

It's frustrating, do you know of any work-arounds?

I save often, so usually I can just close the file, re-open it, and the undo feature works again. Then, eventually (maybe in 20 seconds, maybe in an hour, maybe not at all), undo breaks again. This is really annoying, because I lose my place, my train of thought, the window size and position, and the split pane position when I have to close and re-open the file.

Details that might help:

  1. I have the MDI interface enabled.
  2. I have Resharper installed.
  3. I have VisualSVN installed.
  4. Using Windows 7 x64 RTM
  5. When undo breaks, the "Undo" option in the edit menu is grayed out. As I continue to edit my document, the option stays grayed out until I close and re-open the document. This demonstrates that it's not just some other app stealing the hotkey. The whole feature stops working.
  6. I use a Logitech G19 (can't imagine that's it, but it's not a super popular keyboard, and it does things that are unusual for a keyboard)

I haven't yet taken the painful and annoying troubleshooting steps of reverting to a stripped-down Visual Studio 2008 install (default options, no plugins) and slowly building back up until I begin to experience the issue.

Before doing that I wanted to see if anyone else has experienced this and fixed it.

So, has CTRL - Z ever stopped working for you? Did you fix it?

Am I doing something stupid because this is actually a feature? Like, maybe some hotkey I am accidentally hitting or some action I am taking disables undo?

Twinge answered 7/10, 2009 at 17:3 Comment(2)
Have you tried disabling Resharper? Which version?Herschel
I just went into the AddIn Manager and disabled ReSharper, hit OK, then went back in and re-enabled it. My UNDO came back at that point.Sure
P
7

I've come across the same issue - and I too use VisualSVN and ReShaper. What version of ReSharper are you using, 4.5.x?

I've found it appearing with 4.5.x but a recent EAP build (I can't recall which) did address it for me after I reset the Keyboard layout in Visual Studio.

So first as others have stated, try disabling ReSharper (Addin Manager, until startup too) restart (the IDE) and see if it appears whilst your working (after resetting the keyboard layout).

Priapic answered 15/11, 2009 at 8:11 Comment(0)
A
14

I have observed that the undo option is being disabled when I press CTRL + ENTER accidentally, and I fixed this by removing this hotkey.

To do this go to : Tools -> Option -> Environment -> Keyboard and remove Edit.LineOpenAbove shortcut.

Average answered 7/12, 2012 at 8:21 Comment(1)
I just clicked "Reset" in that screen and it fixed this issue for me (VS2012 ultimate)Victoriavictorian
P
7

I've come across the same issue - and I too use VisualSVN and ReShaper. What version of ReSharper are you using, 4.5.x?

I've found it appearing with 4.5.x but a recent EAP build (I can't recall which) did address it for me after I reset the Keyboard layout in Visual Studio.

So first as others have stated, try disabling ReSharper (Addin Manager, until startup too) restart (the IDE) and see if it appears whilst your working (after resetting the keyboard layout).

Priapic answered 15/11, 2009 at 8:11 Comment(0)
L
6

If the other solutions don't work

I think a common problem is that keyboard bindings get changed somehow. It's easiest just to go and reset them like this:

  • Reset them. Tools -> Options -> Environment -> Keyboard -> Reset -> OK
  • Restart Visual Studio
Leverick answered 27/6, 2016 at 14:21 Comment(1)
This problem existed for me on VS2013 update 5. In attempting above, the initial setting for 'Apply the following additional keyboard mapping scheme:' was set to 'Visual C++ 6'. Hitting the reset button changed it to '(Default)'. Restarting Visual Studio solved it. Thank you very much!Millardmillboard
I
2

I had the same problem recently. I think it was caused by an exception in ReSharper (these are shown in the status bar of Visual Studio), at least ReSharper showed a message box to submit some errors to JetBrains at around the same time.

If you experience this problem again, verify whether ReSharper shows any errors/exceptions, and if it does, you might want to submit them to JetBrains.

After restarting Visual Studio, undo worked again (for me).

Incrustation answered 7/10, 2009 at 17:12 Comment(1)
Hmm... this didn't help. Next step is to disable resharper.Twinge
W
1

I had this in visual studio 2008SP1 - one day the undo function just completely stopped working. Looking at a previous posters comment, i just did :

Tools -> Option -> Environment -> Keyboard Press Reset

After restarting visual studio, undo now works.

Wamsley answered 1/11, 2013 at 8:48 Comment(0)
B
0

I would check out your clipboard ring and watch and see when/if it gets cleared out. If that ever happens you'll know you just lost your undo. Also, if you can see it happen then you might have a better chance of identifying what is causing it.

Baa answered 7/10, 2009 at 17:15 Comment(1)
It seems to happen most often when I use the split-pane feature (to view two different parts of the same document)Twinge
K
0

I just had this problem of Undo becoming disabled. I'm using VS2008 Developer Edition. I don't have ReSharper intsalled. Going off @Joseph's suggestion I thought I'd check the clipboard, but before I did that I tried cycling the clipboard Edit -> Cycle Clipboard Ring and Undo came back. This is the first time it has happened. I will update this if it happens again.

Update Seems I got lucky. It happened again and the Edit->Cycle Clipboard Ring trick didn't work. This has never happened to me before, and the situation it is occurring in is novel too - I'm running two instances of VS2008 - one with a WCF service running, the other a simple web app calling the webservice. The really odd thing is, is that when I am actually debugging the undo icon becomes active! As soon as I stop debugging it greys out (in both instances)

Khaki answered 12/3, 2010 at 1:28 Comment(0)
W
0

If anyone is still following this, Undo disables for me when I try to Ctrl+Shift+Enter to jump to a new line.

I am using VS2008 Pro, WinXP, editing an XSLT file. Resetting keyboard settings does not help. AnkhSVN installed but not in use.

Whistler answered 15/3, 2010 at 20:4 Comment(3)
I still read this and my fix was to move to VS2010 :) That may not be an option for you, but... maybe it is...Twinge
Ctrl+Shift+Enter has no effect on Undo for me. But thanks for the new keyboard shortcut!Khaki
I just had the exact same problem with Visual Studio 2010. (Undo suddenly stopped working.) I closed VS2010, reopened it and the problem has not come back yet. I read somewhere that VS2010 SP1 may fix this. My version is 2010 Premium w/o any service packs.Villainage

© 2022 - 2024 — McMap. All rights reserved.