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
Undo text not working when focus is in file explorer #111630
bugIssue identified by VS Code Team member as probable bugfile-explorerExplorer widget issuesinsiders-releasedPatch has been released in VS Code Insidersunder-discussionIssue is under discussion for relevance, priority, approachundo-redoIssues around undo/redoverifiedVerification succeeded
We have decide to behave like this -> if focus is in explorer we do not undo the changes done in the editor.
We can easily change this, though I would like to gather more feedback before chaning anything here. Thus assigning to December and debt week.
The only negative feedback regarding undo is this issue #112706
Making the undo stack "shared" between the explorer and editor does not make a lot of sense to me since it is not really complementery with the current approach of each editor having it's own undo stack.
The only thing I would consider changing is: if the Explorer has no undo stack, then pressing undo when focus is in the Explorer would undo in the editor. Alexandru Dima (@alexdima) what do you think?
The only negative feedback regarding undo is this issue #112706
Isidor Nikolic (@isidorn) I agree that we should prompt for destructive undos. Is that something I need to help you with or can you do it outside the undo redo service?
if the Explorer has no undo stack, then pressing undo when focus is in the Explorer would undo in the editor
I like this idea. I think you can do it on your side by doing something like this e.g.
Alexandru Dima (@alexdima) thanks. I just tried that and works as expected. Thus I pushed and closing this one since I would do no other changes here.
As for the prompt for desctructive undo, I think I can handle it from the DeleteOperation that is an undo.
I will create a PR to tackle that and we can continue the discussion #112706
So if I implement this in the DeleteOperation I might be duplicating code.
However I see that the UndoRedoService is unaware of what kind of an operation it is.
To sum it up I suggest:
Let's remove the check from the UndoRedoService
And have only a check in the DeleteOperation. That should catch both the new case, and the original case for which you introduced the check in the UndoRedoService
Let me know what you think
fyi Johannes Rieken (@jrieken) we are discussing to introduce a prompt before destructive undo operation. I am not sure if it would be a problem to prompt before all undo DeleteOperations. I would have a "Do not show again" checkbox.
bugIssue identified by VS Code Team member as probable bugfile-explorerExplorer widget issuesinsiders-releasedPatch has been released in VS Code Insidersunder-discussionIssue is under discussion for relevance, priority, approachundo-redoIssues around undo/redoverifiedVerification succeeded
Activity
[-]Undo text after undo file name not wodking[/-][+]Undo text after undo file name not working[/+]isidorn commentedon Dec 1, 2020
We have decide to behave like this -> if focus is in explorer we do not undo the changes done in the editor.
We can easily change this, though I would like to gather more feedback before chaning anything here. Thus assigning to December and debt week.
[-]Undo text after undo file name not working[/-][+]Undo text not working when focus is in file explorer[/+]alexdima commentedon Dec 2, 2020
I've changed the title to reflect easier repro steps:
isidorn commentedon Jan 15, 2021
The only negative feedback regarding undo is this issue #112706
Making the undo stack "shared" between the explorer and editor does not make a lot of sense to me since it is not really complementery with the current approach of each editor having it's own undo stack.
The only thing I would consider changing is: if the Explorer has no undo stack, then pressing undo when focus is in the Explorer would undo in the editor. Alexandru Dima (@alexdima) what do you think?
alexdima commentedon Jan 15, 2021
Isidor Nikolic (@isidorn) I agree that we should prompt for destructive undos. Is that something I need to help you with or can you do it outside the undo redo service?
I like this idea. I think you can do it on your side by doing something like this e.g.
isidorn commentedon Jan 18, 2021
Alexandru Dima (@alexdima) thanks. I just tried that and works as expected. Thus I pushed and closing this one since I would do no other changes here.
As for the prompt for desctructive undo, I think I can handle it from the
DeleteOperationthat is anundo.I will create a PR to tackle that and we can continue the discussion #112706
isidorn commentedon Jan 18, 2021
Adding bug label so we get this verified, steps:
isidorn commentedon Jan 18, 2021
Alexandru Dima (@alexdima) on second thought I just remembered that the
UndoRedoServicealready has a check hereSo if I implement this in the
DeleteOperationI might be duplicating code.However I see that the
UndoRedoServiceis unaware of what kind of an operation it is.To sum it up I suggest:
UndoRedoServiceDeleteOperation. That should catch both the new case, and the original case for which you introduced the check in theUndoRedoServiceLet me know what you think
fyi Johannes Rieken (@jrieken) we are discussing to introduce a prompt before destructive undo operation. I am not sure if it would be a problem to prompt before all undo
DeleteOperations. I would have a "Do not show again" checkbox.explorer: if you can not undo, pass undo to editor
Trusted Workspaces Feature Branch Merge (#115961)