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 add new line for every existing lines #4176

Open
tpakhoa1996 opened this issue Oct 15, 2019 · 9 comments
Open

Undo add new line for every existing lines #4176

tpakhoa1996 opened this issue Oct 15, 2019 · 9 comments

Comments

@tpakhoa1996
Copy link

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:

  1. Go into a file
  2. Make changes
  3. 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
@paparent
Copy link

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.

@GalloglyP
Copy link

GalloglyP commented Apr 24, 2020

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

@SomnaW
Copy link

SomnaW commented Oct 3, 2020

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.

@rcmosher
Copy link

rcmosher commented Dec 9, 2020

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.

@nicholasgrout
Copy link

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.

@thomassvensen
Copy link

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.

@grapereader
Copy link

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) #2007 (comment)

@ahmadsdn
Copy link

ahmadsdn commented Jan 9, 2022

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.

@rhys-vdw
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests