# repl: Add a delete-cell action to the notebook editor \(\#61295\) · gitcafe/zed

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

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

Visibility: public

Requested revision: b535bec7bf42bff5692f90022dc6c1049fdc1e91

Requested commit: b535bec7bf42bff5692f90022dc6c1049fdc1e91

Commit: b535bec7bf42bff5692f90022dc6c1049fdc1e91

Tree: 8d77cf714ca479c7b6d731f9ca0f1583fc0a7dd8

Author: Arnesh

Committer: GitHub

## Message

```
repl: Add a delete-cell action to the notebook editor (#61295)

The notebook editor has actions for adding and moving cells but no way
to delete one. This adds `notebook::DeleteCell`:

- Trash icon button in the notebook toolbar (own group below
add-markdown/add-code, disabled when the notebook has no cells)
- Jupyter-style `d d` binding plus `backspace` in cell command mode
(macOS and Linux keymaps)
- Deletes the selected cell; selection moves to the neighboring cell,
focus returns to command mode, and the item is marked dirty via the
existing structural-change tracking so saving persists the deletion

Tested locally on macOS with the notebook feature enabled: button click
and bindings delete the selected cell and saving writes the result.
(Screenshots in comments.)

Release Notes:

- Added a delete-cell action (`d d` in command mode and a toolbar
button) to the notebook editor (preview-only).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
```

## Parents

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

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