Vim
Vim copied to clipboard
A sequence of undone changes cannot be redone past the last one
Describe the bug A sequence of undone changes cannot be redone past the last one. Possible data loss.
To Reproduce Steps to reproduce the behavior:
- Make some changes
- Undo 5 times with
u
- Redo 5 times with
ctrl+r
- Only the first redo (of the last undo) works
Expected behavior All undone changes are re-applied.
Screenshots —
Environment (please complete the following information):
- Extension (VsCodeVim) version: v1.23.2
- VSCode version: 1.71.0-insider b0895f9
- OS: macOS
Additional context
- Sometimes it works, but when it doesn’t it’s a data loss scenario unless the file was saved before the undo took place.
- A few days ago I had to re-write a couple dozen LoC from memory due to this bug.
- Didn’t happen until the last time I let VSC and extension upgrade themselves. Now it happens every day many times.
- Increasing undo history to 500+ didn’t help.
I've also been having this issue for the last week (weeks?). Undo no longer works past the first change. In the meantime I've bound U to native undo, but this is problematic with find/replace, formatting, etc.
Environment: Extension version: vscodevim v1.23.2 VSCode Version: 1.71.0-insider (Universal) Commit: dced70bbf36d3c53c08e791da1791ac7fc42519b Date: 2022-08-10T05:18:38.020Z Electron: 19.0.11 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Darwin arm64 20.6.0 Sandboxed: Yes
@parkerault I can reproduce this too. My original issue was with redo, but right now undo is also broken, all invocations after the first one do nothing. It does not happen all the time, but it happens every few days and it’s painful.
Might be related to #4854. I have done a few changes as a test, and it looks like undo history gets essentially flushed once it stumbles across the first change that involved a visual selection (v
).
I'm experiencing this too. Undos generally don't work past the first one. I just end up using the vscode undo/redo with ctrl + z and ctrl + shift + z. this has been broken for several months for me. Anyone figure out a fix?
This is quite recent to me, I'd say it started failing during the last few days. The undo/redo history is seriously broken, I have to use Cmd+z/Cmd+shift+z to realistically use the undo functionality.
macOS Monterrey vsCodeVim: v1.24.1 Visual Studio Code Version: 1.72.2
This is happening to me with VS Code Insiders 1.74. But the strange thing is that sometimes undo is fine.