# Add basic undo in project panel \(\#47091\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/7baf5dc04ed3f7c0d979dbce813b253a58f894e1)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 7baf5dc04ed3f7c0d979dbce813b253a58f894e1

Requested commit: 7baf5dc04ed3f7c0d979dbce813b253a58f894e1

Commit: 7baf5dc04ed3f7c0d979dbce813b253a58f894e1

Tree: b24f32ed261ee0ebab35c0674100fd8883c2d3cf

Author: Marco Mihai Condrache

Committer: GitHub

## Message

```
Add basic undo in project panel (#47091)

- Add `project_panel::undo::UndoManager` with a bounded operation stack
  to track and revert project panel operations
- Support undoing file and directory creation, renaming, moving, pasting
  and drag-and-drop operations
- Revert batch operations sequentially in reverse order to handle
  dependencies between them
- Show an error notification when one or more undo operations fail
- Add "Undo" entry to the project panel context menu, disabled when
  there is nothing to undo
- Gate the feature behind the `project-panel-undo-redo` feature flag

Ref: #5039

Release Notes:

- N/A

---------

Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

- [488f79a93dd834975eddc9937632bdf9cb71e55e](https://git.cafe/gitcafe/zed/commit/488f79a93dd834975eddc9937632bdf9cb71e55e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/7baf5dc04ed3f7c0d979dbce813b253a58f894e1?format=markdown)
