VS Live share undo affects multiple users
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
When two people (U1 and U2) share a VSCode session and both use the vim plugin. When U1 presses u while U2 is in insert mode, then everything U2 did dissapears as well. If U2 exits insert mode and presses <C-r>, then it will be impossible to recover the lost text.
To Reproduce
Steps to reproduce the behavior:
- U1, U2 in insert mode, both write something
- U1 exits insert mode, U2 still in insert mode
- U1 presses
uto undo their recent changes
Now, everything U2 has written will dissapear as well
- U2 presses to exit insert mode
- U2 presses to redo the previous undo
Behaviour: What U1 did will be recovered, but what U2 did will not be recovered. This happens since U2, entered and exited insert mode without making any changes, it will be impossible to recover their lost work.
Workaround:
- U1 presses
<C-r>before U2 exits insert mode
Expected behavior
When U1 presses u, then only what U1 wrote should dissapear.
Environment (please complete the following information):
Visual Studio Code
Version: 1.32.3 (system setup)
Commit: a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4
Date: 2019-03-14T23:43:35.476Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17134
Live Share
Name: Live Share
Id: ms-vsliveshare.vsliveshare
Description: Real-time collaborative development from the comfort of your favorite tools.
Version: 1.0.181
Publisher: Microsoft
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare
Vim
Name: Vim
Id: vscodevim.vim
Description: Vim emulation for Visual Studio Code
Version: 1.8.0
Publisher: vscodevim
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=vscodevim.vim
- Extension (VsCodeVim) version:
- VSCode version:
- OS:
Additional context
One user on windows, one on Ubuntu. Ubuntu laptop shared the session, not sure of its exact setup.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the shared-session scenario with VS Code, Live Share, and VSCodeVim using the reported steps, checking how undo and redo behave when both users edit concurrently. Done means that pressing undo removes only the initiating user's changes and the other user's text remains recoverable with redo.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vim, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100