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

Broken undo stack with move lines up with multiple cursors #48741

Closed
joaomoreno opened this issue Apr 26, 2018 · 3 comments
Closed

Broken undo stack with move lines up with multiple cursors #48741

joaomoreno opened this issue Apr 26, 2018 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded
Milestone

Comments

@joaomoreno
Copy link
Member

if (foo) {
	return bar	
}

// a comment
  1. Create a text file with the contents above, no special mode needed
  2. Put cursor in the middle of word comment
  3. Duplicate cursors up twice (on Linux it's Alt Shift Up)
  4. Move line up (on Linux it's Alt Up)
  5. Undo 💥

peek 2018-04-26 10-57

@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Apr 26, 2018
@alexdima
Copy link
Member

This was introduced via 3114b0c where we sort reverse operations. But the sorting of reverse operations can be done only if the order is non significant. The order is significant if edit ranges are touching. So, reverse operations should not be sorted when edit ranges are touching.

@alexdima alexdima added the important Issue identified as high-priority label Apr 26, 2018
@alexdima alexdima added this to the April 2018 milestone Apr 26, 2018
@alexdima
Copy link
Member

Thanks for catching this @joaomoreno !

@joaomoreno
Copy link
Member Author

Where's my check 💰

@tsalinger tsalinger added the verified Verification succeeded label Apr 27, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants