Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support undo a WorkspaceEdit #77190

Closed
testforstephen opened this issue Jul 11, 2019 · 3 comments
Closed

Support undo a WorkspaceEdit #77190

testforstephen opened this issue Jul 11, 2019 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality undo-redo Issues around undo/redo workspace-edit
Milestone

Comments

@testforstephen
Copy link

VS Code client supports applying two kinds of changes in a workspace edit:

  • text change
  • resource change (CreateFile | RenameFile | DeleteFile)

But when the user is clicking ctrl+z, it only undo the text changes from currently opened file, not all changes from a workspace edit. Even don't support undo file operations such as CreateFile/RenameFile/DeleteFile at all.

Usually from the perspective of a user, i will consider all changes caused by one UI operation as a action unit, they should be applied or undo together instead of separately.

@OrkhanAlikhanov
Copy link

Just for information, in IntelliJ undo stacks are separate for project tree (explorer) as well as for each file.

@jrieken jrieken assigned rebornix and alexdima and unassigned jrieken Jul 11, 2019
@Eskibear
Copy link
Member

I need this too.
I'm working on implementing a quickfix code action that creates a class for Java users. That is, actually, to create a file and fill in some snippet. Currently I can use a WorkspaceEdit to 1) create a file, 2) insert some content. But it's impossible to undo them together, the created file won't be deleted. By undo the action, the user finally has the empty file left, which is not expected.

@rebornix rebornix added the feature-request Request for new features or functionality label Jul 17, 2019
@alexdima alexdima added this to the Backlog milestone Aug 8, 2019
@alexdima alexdima removed their assignment Aug 8, 2019
@rebornix rebornix removed their assignment Oct 24, 2019
@jrieken jrieken self-assigned this Dec 16, 2019
@alexdima alexdima added the undo-redo Issues around undo/redo label Feb 26, 2020
@jrieken
Copy link
Member

jrieken commented Sep 29, 2020

done. actually dupe of #101789

@jrieken jrieken closed this as completed Sep 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality undo-redo Issues around undo/redo workspace-edit
Projects
None yet
Development

No branches or pull requests

6 participants