Skip to content

Prompt before destructive Explorer undo #112706

Closed

Description

@chindathorn

Issue Type: Feature Request

Please remove "Undo feature" (Ctrl+z) in file explorer side. I have created lots of files and when I tab from text editor to the file explorer tab side, by accidentally press Ctrl+z it undoes all my created files. so I lost a lot of codes. Sad with Ctrl+z feature in file explorer VSCode.

VS Code version: Code 1.52.1 (ea3859d, 2020-12-16T16:34:46.910Z)
OS version: Windows_NT x64 10.0.18363

Activity

  1. added
    feature-request
    file-explorer
    and removed on Dec 17, 2020
  2. deleted a comment from vscodebot on Dec 17, 2020
  3. isidorn commented on Dec 17, 2020

    @isidorn

    Thanks for feedback. We will not remove it, but we might introduce a prompt.
    Let's leave this open for now so other users can also chime in with their opinion.

  4. changed the title [-]Undo mistake[/-] [+]Prompt before destructive Explorer undo[/+] on Dec 17, 2020
  5. johnchurchill commented on Dec 26, 2020

    @johnchurchill

    This (combined with #111640) is the most dangerous behavior of VS Code that I have encountered (actually, of any IDE, ever). I lost hours of uncommitted work by pressing Cmd-Z just 4 times when I thought the editor had context. It's baffling that the explorer pane has its own memento stack so it will delete files created days earlier after numerous changes in the editor pane. Worse, I can't even reproduce it with a fresh run, which tells me that VS code is getting its undo stack confused after hundreds of edits.

    My suggestion is that the explorer pane not have any undo functionality (or at least make it an opt-in setting). It doesn't make sense to even try when the majority of files appear and disappear though external means (e.g. ng generate or git branch operations).

  6. added
    unreleased
    on Jan 18, 2021
  7. isidorn commented on Jan 18, 2021

    @isidorn

    Thanks to work with Alexandru Dima (@alexdima) we have now changed that we prompt when undoing a creation operation
    We can change this to prompt in more cases if needed.
    Try it out and let us know how it goes. We can also add an option "Do not show again", but let's not do this yet (since we can only nicely reset this if we introduce a setting).

    fyi Johannes Rieken (@jrieken) in case you are interested in changes d427dea
    I think it was pretty straight forward.

  8. added
    verification-needed
    on Jan 18, 2021
  9. isidorn commented on Jan 18, 2021

    @isidorn

    To verify:

    1. Creat a file or folder in Explorer
    2. Make sure focus is in Explorer
    3. Undo. Make sure you are Prompted
    4. Do a bit more of undo, and make sure you are always prompted exactly once when doing a destructive undo
  10. added
    insiders-released
    and removed
    unreleased
    on Jan 19, 2021
  11. locked and limited conversation to collaborators on Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestfile-explorerinsiders-releasedundo-redoverification-neededverified

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions