Skip to content

File explorer operations are undo when the editor has focus but undo stack is empty #111659

Closed

Description

@rebornix

Testing #111015

When the focus is in the editor that the Undo and Redo are applied on the Editor. And that the Explorer is Undone only when the focus is on the Explorer

This might not be true as currently I'm seeing

  • Rename a file in the explorer
  • Focus the editor
  • cmd+z
  • The file name is reverted, this is because the undo stack in the editor is empty, which makes sense but the focus is not on the Explorer

Activity

  1. isidorn commented on Dec 2, 2020

    @isidorn

    I believe this is by design of the Editor.
    Somewhat similar, just the other way around #111630

    Also assigning to Alexandru Dima (@alexdima) since this is Editor behavior and I think we can easily change it to undo only things from the Editor.

    The other way to fix this, is to keep this as it is and to change #111630
    Basically making undo global

    Martin Aeschlimann (@aeschli) on thoughts

  2. added
    under-discussion
    undo-redo
    on Dec 2, 2020
  3. alexdima commented on Dec 2, 2020

    @alexdima
    Member

    This is consistent with other kind of operations, like a refactoring which renames the file and then typing in the file. At one point, when the focus is in the editor and undoing it will hit the refactoring and will rename the file back. So IMHO this is OK.

  4. ghs commented on Feb 12, 2021

    @ghs

    I agree that is consistent with other ops, but sometimes when changing between different app, the focus is lost and undoing something is happening not within the editor but the explorer. Will be great to have some confirmation when changes are made within the explorer or an option within the VSC preferences.

  5. isidorn commented on Feb 12, 2021

    @isidorn

    We have added a confirmation for destructive undos. Check it out in the latest vscode version.

  6. isidorn commented on Aug 13, 2021

    @isidorn

    Closing as no changes are planned here.

  7. locked and limited conversation to collaborators on Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

under-discussionundo-redo

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions