You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
File explorer operations are undo when the editor has focus but undo stack is empty #111659
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
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.
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.
Activity
isidorn commentedon Dec 2, 2020
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
alexdima commentedon Dec 2, 2020
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.
ghs commentedon Feb 12, 2021
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.
isidorn commentedon Feb 12, 2021
We have added a confirmation for destructive undos. Check it out in the latest vscode version.
isidorn commentedon Aug 13, 2021
Closing as no changes are planned here.