Undo add new line for every existing lines
Describe the bug When I press 'u' to undo all the changes, it adds new line for every existing lines in my file while ctrl-z doesn't do the same thing.
To Reproduce Steps to reproduce the behavior:
- Go into a file
- Make changes
- Hold u to undo all the changes
Expected behavior New lines getting added for every existing line.
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.11.2
- VSCode version: 1.39.1
- OS: Window
It happens to me too :( And bad thing: I can't "undo" or "redo" those whitelines. So I'm stuck to close the file without saving.
I have been dealing with this issues since I started using vscode mid 2019. I cannot find STR, just holding down u does not induce this bug for me, however it does have something to do with undo. Annoyingly once this starts you cannot close the tab in a large file until the entire file has had a new line inserted at every line. This issue occurs multiple times a day for me.
Extension (VsCodeVim) version: 1.13.1 VSCode version: 1.44.0 OS: Window 10
Extension (VsCodeVim) version: 1.13.1 VSCode version: 1.43.1 OS: Debian 10.3
This has been happening for a long time for me too. For most of that time I thought it was random, but I can now confirm that the pattern is that it is related to the "u" action somehow. The only solution is to hopefully have saved recently, because you have to close without saving to get back to a previous state. All history is lost as far as undo/redo is concerned.
This doesn't happen all the time for me, but it does happen frequently. I speculate it happens after hitting Ctrl-t, which I do by mistake a lot.
@paparent I have found that Ctrl+z does undo the changes. I usually hold it down to get everything. But you have to be careful to not lose other changes.
This happens to me as well, multiple times a day. I haven't found a reliable way to reproduce. It always happens after using undo with "u" key.
This happens to me, too. It mainly seems to happen if I undo two or more steps, the first undo normally completes just fine. As the others have described, I must also resort to closing the file.
It's surprising that not more users are complaining about this bug. It seems to indicate that this only occurs when something else is also present, e.g. some other extension is installed (Prettier maybe?) or some specific VsCodeVim configuration is used.
Have had this happen on files with >1000 lines. Pray the file was saved before adding a necessary change, otherwise the "press and hold ctrl-z" approach is the only way to get it back.
For now, I am going to try replacing the undo/redo commands with the built-in commands as brought up in this other issue (undo/redo in VSCodeVim is seriously borked in more ways than one) https://github.com/VSCodeVim/Vim/issues/2007#issuecomment-329660927
Man this bug is really annoying. Hope it gets fixed. It's been more than 2 years since OP has posted and reported it. It seems to happen randomly but frequently during the day. Have lost my work multiple times due to this bug. I use vscode in Win10.
Surprised this issue doesn't have more replies. This has probably happened to me once per day for the last three or four years, perhaps longer. The only solution is "revert file". Does anyone have any idea what causes it?