Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo stack lost #10932

Closed
FAQinghere opened this issue Aug 25, 2016 · 7 comments
Closed

Undo stack lost #10932

FAQinghere opened this issue Aug 25, 2016 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded
Milestone

Comments

@FAQinghere
Copy link

FAQinghere commented Aug 25, 2016

Update from bpasero on the issue:

We loose the undo stack very easily when leaving a dirty file in a tab (not visible) and then saving the dirty file:

  • open some tabs and make them dirty
  • wait for a few seconds
  • press "Save All"
  • go to those tabs that where not visible and try to undo
    => you cannot undo

Original description:

  • VSCode Version:
  • OS Version: 1.4.0

Steps to Reproduce:

  1. Make a change, with auto-save on focus lost enabled
  2. Navigate away
  3. Come back and find the undo stack lost

This bug was introduced on OSX a few version ago, but was not then affecting me on Windows (not sure how/why, given the common shell, but nonetheless, that's how it was).

I recently switched back to Windows, updated to the latest VSCode, and now I am suffering the same problem on Windows too.

@FAQinghere
Copy link
Author

upon further investigation, upon auto-save (didn't check manual save... will do that next), it is throwing away the undo buffer for all changes made prior to the previous autosave. So you need to repeat the above steps 2 rounds to see the effect.

  1. Make a test.txt file
  2. Type "buffer 1"
  3. Navigate away from VSCode
  4. Navigate back to VSCode
  5. Type "buffer 2"
  6. Navigate away from VSCode
  7. Navigate back to VSCode
  8. Ctrl-z -> "buffer 2" disappears
  9. Ctrl-z -> "buffer 1" SHOULD disappear, and used to, but no longer does
  10. Sob :)

@FAQinghere
Copy link
Author

This does NOT happen if you save manually, regardless of the auto-save setting.

@bpasero
Copy link
Member

bpasero commented Aug 26, 2016

@FAQinghere I cannot reproduce. I am on Mac and I Alt+Tab out of the window and then come back. Can you try if this reproduces with extensions disabled:

From the command line, execute: code --disable-extensions and try your steps again to see if it reproduces. If you see it is an issue with the extension, please file it against the extension repository itself.

@bpasero bpasero added the info-needed Issue requires more information from poster label Aug 26, 2016
@bpasero bpasero added this to the Backlog milestone Aug 26, 2016
@bpasero bpasero self-assigned this Aug 26, 2016
@FAQinghere
Copy link
Author

Thanks for the quick follow-up. After disabling the only installed extension (just a syntax/color theme), everything seems to working correctly (on the Mac, I don't have the SP4 with me today).

Even after re-enabling the extension(s), everything still seems to be working just fine.

I'll let you know if it pops up again. Thanks again.

@bpasero
Copy link
Member

bpasero commented Aug 26, 2016

@FAQinghere seems unlikely that this extension would cause an issue. It rather sounds to me that your issue is not as easy to reproduce as you described in your steps so there must be something else going on that causes it.

I managed to find an issue which I am planning to fix:

  • open some tabs and make them dirty
  • wait for a few seconds
  • press "Save All"
  • go to each tab and try to undo

=> you lost the undo stack

This happens independent from the auto save setting.

@bpasero bpasero reopened this Aug 26, 2016
@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority and removed info-needed Issue requires more information from poster labels Aug 26, 2016
@bpasero bpasero changed the title Undo stack lost on save (Windows too, now) Undo stack lost on save Aug 26, 2016
@bpasero bpasero changed the title Undo stack lost on save Undo stack lost Aug 26, 2016
@bpasero bpasero modified the milestones: August 2016, Backlog Aug 26, 2016
@bpasero bpasero added the verification-needed Verification of issue is requested label Aug 26, 2016
@FAQinghere
Copy link
Author

Ah, that would explain why I saw it while working in real projects, but not when doing a little single file test project today. Thanks for sticking with it! I've been using Atom for a couple of months because of this, but I keep trying VSCode and look forward to coming back to it full time.

@bpasero
Copy link
Member

bpasero commented Aug 26, 2016

@FAQinghere great, I actually see that many people have reported this. The fix is also available in our insider release on Monday if you want to try it earlier.

We are releasing preview releases of the next stable VS Code version for everyone to try and give feedback. These preview releases are not 100% tested and might be unstable but contain our latest features and bugfixes. You can give our preview releases a try from: http://code.visualstudio.com/Download#insiders

bpasero added a commit that referenced this issue Aug 26, 2016
@bpasero bpasero removed the verification-needed Verification of issue is requested label Aug 29, 2016
@rebornix rebornix added the verified Verification succeeded label Sep 1, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants