Skip to content

[Feature request] Command to clear undo history for current file/session. #96601

Closed

Description

@mmghv

It would be very useful to have a command to clear undo history for current file/session.

That would allow for more control while trying to benefit from the "persist undo" feature, so I can use it but still have the ability to clear undo history whenever I want.

Scenario when this is needed:
When I finish some changes and commit them, I usually want to clear undo history so that I can start a new commit and not undo changes from previous commit by accident.

Activity

  1. added
    feature-request
    undo-redo
    on Apr 30, 2020
  2. vscode-triage-bot commented on Apr 30, 2020

    @vscode-triage-bot

    This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  3. vscode-triage-bot commented on Jun 20, 2020

    @vscode-triage-bot

    This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding

  4. vscode-triage-bot commented on Jun 30, 2020

    @vscode-triage-bot

    🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  5. boltex commented on Aug 13, 2020

    @boltex

    My extension (https://github.com/boltex/leointeg) uses file system api to implement custom 'editors' for my needs as indicated in the docunmentation here https://code.visualstudio.com/api/extension-guides/virtual-documents#file-system-api .

    I need to be able to 'block' or 'clear' undos when closing or switching from one of them to another.

    It used to be that doing vscode.WorkspaceEdit "rename" operation would 'clear'/'block' all undos for the newly named document to traverse across the point where the document was renamed, but lately the newer versions of vscode tries to open a document with the old name when pressing ctrl+Z on a newly renamed document (in a custom filesystem)... Is there a way to disable that? Or a way to clear the undo stack for a given document URL? or for a filesystem scheme only in particular?

    Thanks!

  6. locked and limited conversation to collaborators on Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestundo-redo

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions