Vim: Undo replaces file content

Created on 18 Apr 2018  路  5Comments  路  Source: VSCodeVim/Vim

This a BUG REPORT

How to reproduce it:

  1. Open document A
  2. Open document B
  3. Type :wq (or just close and save file)
  4. Open B again
  5. You can do some changes or do not (most annoying if you do)
  6. Press u

What happened:
Content of document B will be replaced on content of A

What did you expect to happen:
Nothing

Environment:

  • Extension (VsCodeVim) version: 0.11.4
  • VSCode version: 1.22.2
  • OS version: Arch Linux
kinbug

Most helpful comment

This is a longstanding bug (see https://github.com/VSCodeVim/Vim/issues/2007). Thank you SO MUCH for figuring out a way to reproduce it. As you can see, a lot of people tried without success.

For the record, I needed to really open the documents, i.e. either Ctrl+S or double-click the header. Temporarily opening A did not trigger the bug, a.k.a

  1. Open document A
  2. CTRL+S
  3. Open document B
  4. modify B
  5. :wq
  6. Open B again
  7. Press u

All 5 comments

This is a longstanding bug (see https://github.com/VSCodeVim/Vim/issues/2007). Thank you SO MUCH for figuring out a way to reproduce it. As you can see, a lot of people tried without success.

For the record, I needed to really open the documents, i.e. either Ctrl+S or double-click the header. Temporarily opening A did not trigger the bug, a.k.a

  1. Open document A
  2. CTRL+S
  3. Open document B
  4. modify B
  5. :wq
  6. Open B again
  7. Press u

@doudou You are right. Thanks :+1:

Awesome! Thanks for the repro. I did some digging a week ago, and I'm pretty sure the commit that caused this issue was https://github.com/VSCodeVim/Vim/issues/1503.

Having a repro so I can make sure both cases still work is great! Hopefully I'll be able to nail down this issue once and for all soon.

oh nice! I ended up just using visual studio undo and redo commands overriding vscode undos because of this random problem. also vscodevim would also "lowerify" all my text so that was awesome -_-

This particular issue is fixed in https://github.com/VSCodeVim/Vim/pull/2547

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rajinder-yadav picture rajinder-yadav  路  3Comments

ghost picture ghost  路  3Comments

orn688 picture orn688  路  3Comments

edwintorok picture edwintorok  路  3Comments

gerardmrk picture gerardmrk  路  3Comments