The VSCodeVim team prioritizes issues based on reaction count.
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT
Environment:
What happened: The upgrade to 1.13 just now undo (key 'u') and Redo (Ctrl-R) to stop working.
What did you expect to happen: undo my current changes
How to reproduce it:quite simple just try it.
Possible duplicate of #1783
@michaelHL , I just read the issue #1783 that you linked above. I do not believe that the problem is with the NeoVim integration. I had NeoVim working fine with the previous release of VSCode. This happened just now when I upgraded to the VSCode Version 1.13 approximately an hour ago. It seems to be a latest VScode release not working well with VSCodeVim plugin version 0.8.4
I can undo and redo on osx with 1.13 and 0.8.4... can you disable neovim integration temporarily to see if it may just be that other issue?
@xconverge, I just tried it. Negative. disabling NeoVim integration does not help with VIM Undo Redo functionality. I even exited VSCode and restarted it after commenting the NeoVIM integration out in settings.json. No go.
I cannot reproduce this...weird...
@bruparel I have no NeoVim in my PC but the Undo, Redo stop working after saving too...(since VSCode update to 1.13)
Me too.
This is an issue on linux as well. It seems that undo/redo work until you save the file. Then any changes that were made before the save cannot be undone/redone
This is strange... People reported this bug before, but it seems that this bug only became widespread with the update to VSCode 1.13...
Alright I figured out the cause of the issue. It has to do with this lovely function:
https://github.com/VSCodeVim/Vim/blob/master/extension.ts#L411
For whatever reason, VSCode is now reporting many more saves as "content changed from disk".
Removing that "historyTracker.clear()" line fixes the issue, but undoubtedly causes other issues. I'll need to do a little digging to figure out the root cause of this.
More specifically, I'm 70% sure that this is the change that is causing the issues:
This issue is fixed on master, which means we would normally close it, but I'm going to keep this open for now for people searching for it.
We just pushed out a new release, and this problem should be fixed in v0.8.5
Just to let everyone know: you will have much better luck with the Undo functionality IF you set (or remove) the 'autosave' from your settings.json. With AutoSave On (even after delay), the Undo works much more erratically. Even with the autosave disabled, the Undo is nowhere near the rock solid reliability of 'MVIM' for instance. My fingers are trained to save frequently and with the NeoVim Integration, doing a ":w" or ":wa" is natural for me. Just a few pointers ... :)
@bruparel Wait, are you still having issues with the undo functionality after the new update?
If I have "files.autoSave": "afterDelay" in my settings.json file. As I said above, I removed it and now it works fine.
@bruparel Could you elaborate on any issues you're having with "files.autoSave": "afterDelay"? I thought we fixed all issues related to undo and saving.
I'm having the same behavior than @bruparel: if setting "files.autoSave" is set to "afterDelay" the undo and redo functions don't work after save (with all the other options works fine).
Version: 1.19.0
Commit: 816be6780ca8bd0ab80314e11478c48c70d09383
Date: 2017-12-14T09:56:48.842Z
Shell: 1.7.9
Renderer: 58.0.3029.110
Node: 7.9.0
Architecture: x64
OS: Fedora 27
Let me know if you need me to open another issue for this.
Most helpful comment
@bruparel I have no NeoVim in my PC but the
Undo,Redostop working after saving too...(since VSCode update to 1.13)