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

Create an undo stop when alternating between constructive edits, destructive edits, and cursor navigation #29036

Closed
axefrog opened this issue Jun 19, 2017 · 2 comments
Assignees
Labels
editor-core Editor basic functionality feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@axefrog
Copy link

axefrog commented Jun 19, 2017

  • VSCode Version: 1.13.0
  • OS Version: Windows 10

VSCode's undo behaviour seems unusually coarse and not in line with how other editing experiences work. Often I accidentally hit the wrong key while something is selected and accidentally overwrite what I'd written. Then when I hit undo, it undoes not only what I just did, but a whole lot of what I'd done previously. Undo is supposed to save the user from these sorts of problems.

Steps to Reproduce:

  1. Type some words
  2. Delete the last word
  3. Type some more words
  4. Decide you don't like your change and hit undo

The entire sentence vanishes.

Undo stops should occur (roughly) in the following scenarios:

  • When starting a new destructive operation (backspace, delete, cut, etc.) after a constructive operation (typing, pasting, other insertion scenarios).
  • The inverse of the above; starting a new constructive operation after a destructive operation.
  • Between different classes of destructive or constructive edit - for example if I backspace a few times, removing characters left of the cursor, and then use the delete key, removing characters to the right of the cursor, I'd expect an undo stop to occur when the delete key is first pressed.
  • Starting to navigate and/or select text with the cursor after any kind of edit, or starting an edit operation after navigating with the cursor.
@axefrog axefrog changed the title Create an undo stop when alternating between deletion and insertion Create an undo stop when alternating between constructive edits, destructive edits, and cursor navigation Jun 19, 2017
@alexdima
Copy link
Member

Currently, undo stops are inserted at any cursor movement operation, and any editing operation (such as typing or deleting) does not insert undo stops, so I think your last bullet point is already covered.

👍 I like the other 3 bullet points

@alexdima alexdima added this to the On Deck milestone Jun 20, 2017
@alexdima alexdima added editor-core Editor basic functionality feature-request Request for new features or functionality labels Oct 20, 2017
@alexdima alexdima modified the milestones: On Deck, October 2017 Oct 20, 2017
@axefrog
Copy link
Author

axefrog commented Oct 20, 2017

Wow, looks like this is fixed, then? Great work! :-)

@alexdima alexdima added the verification-needed Verification of issue is requested label Oct 30, 2017
@roblourens roblourens added the verified Verification succeeded label Nov 1, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-core Editor basic functionality feature-request Request for new features or functionality verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants