Bug with Ctrl + Z and Ctrl + Y


  • Hi.

    I am facing a Problem with going BackWard and ForWard with the HotKeys Ctrl + Z and Ctrl + Y.

    Currently i am working on a Silverlight 4.0 Project (if this makes any difference, i dont think so...) and everytime when i want to go back with Ctrl + Z (a larger number of times - not only once or twice), code will get replaced in different lines, characters are getting swapt and/or deleted. Empty Lines are getting added.. and the overall code gets more or less completly destroyed.

    When going Ctrl + Y the same happens, and i am forced to write the Code again, because i cannot manage to get a working code again...

    My Visual Studio Version is 2010 Ultimate 10.0.30319.1 RTMRel.

    If you need any more Informations i will try my best to give you answers.

    Hope there is or will be a fix soon.

    It happens, pretty likely when going BackWards several Days.. I can than see some Code snippets i have done 2 days ago, in middle of my new Code...

    P.s.: Searched threw the Forum and only found Problems with pasting that i also have, but nothing with ForWard and BackWard.

    • Edited by UnKnOwN_86 Saturday, July 10, 2010 4:57 AM
    Friday, July 02, 2010 11:37 AM

All replies

  • Hi - Do you mean Ctrl+Z (undo) and Ctrl+Y (redo)?  Ctrl+X is cut, which doesn't correspond to the idea of moving backward.  Either way, I'd encourage you to file a Connect bug for this issue with as much information as you have.  That will enter a report in our official bug tracking datase.  We'll try to reproduce the problem, ask you for more information if needed, and often assign the problem to a developer for investigation.


    Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter

    Tuesday, July 06, 2010 6:42 PM
  • Yeah sry for the misspelling, i really meant the Ctrl + Z (undo) and Ctrl + Y (redo) (Fixed it in the first post)

    Isnt there a way, to send you the file with the error. It just doesnt happen all the time and its really hard to repoduce, but once the error is in there you can always make the error happen when undoing and redoing?!?





    Saturday, July 10, 2010 5:05 AM
  • This has happened in all versions to date.  The trigger could be editing between the ctrl-Z/Y registrations but I don't log these.  Does that make sense?  Ignore if not.  Your description sounds worse that what I encounter.  I see missing redos but I don't log these.  This may appear as lines moved around, lines not where they were originally and of course lines no longer there.  Attempting further ctrl-Z/Y in the vain attempt to restore synchronicity makes things worse.  I get out and load a backup.  Fortunately, I make backups very often.
    Saturday, July 10, 2010 10:32 AM
  • UnKnOwN_86:  Sure, you can definitely send us the file.  Once you log a Connect bug, there should be an option to attach files.  I'd recommend zipping up the file with the error, attaching it, and then telling us what you're expecting when Ctrl+Z is pressed vs. what's actually happening.  If you'd like, feel free to post the bug number here and I'll make sure it's routed to an appropriate team promptly.

    Brittany Behrens | Program Manager | Visual Studio Platform - Editor | The Visual Studio Blog | @VSEditor on Twitter

    Monday, July 12, 2010 11:11 PM
  • Just to check, do you have productivity add-ons installed, such as Resharper, Coderush, Virtual Tomato X or any other add-on that changes default Visual Studio behaviour? If so, try disabling these to see if you can still reproduce the issue.
    Sunday, May 29, 2011 2:42 PM
  • I'm usually changing my HTML code in simple editor (notepad++). For several days I'm working directly in visual studio and i have faced with this issue at least 4 times today. I will never work in visual studio again... I like Undo/Redo as much as i like and I want to work it perfectly. My choice is notepad++. Simple, free and best editor I've ever seen.
    Wednesday, July 06, 2011 2:25 PM
  • There is already a Connect issue for this bug: http://connect.microsoft.com/VisualStudio/feedback/details/570374/undo-feature-occasionally-doesnt-work-right

    And yes, it's hard to reproduce: it only happens occasionally. As mentioned over there, I have no addons of any kind installed. It seems that this happens if I Ctrl+X some code, have VS take a while to think about it, and make an edit while it's thinking. The edit goes to the wrong location, I hit Ctrl+Z, and wham, my code gets damaged.

    • Edited by Roman.St Thursday, September 08, 2011 4:26 PM
    Thursday, September 08, 2011 4:15 PM