# project_panel: Improve behavior for cut-pasting entries \(\#31931\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 657c8b1084f835bdd3e536b4057bd3439049d962

Requested commit: 657c8b1084f835bdd3e536b4057bd3439049d962

Commit: 657c8b1084f835bdd3e536b4057bd3439049d962

Tree: b40134d3cf01004092605971be98a8b87c11c583

Author: Finn Evers

Committer: GitHub

## Message

```
project_panel: Improve behavior for cut-pasting entries (#31931)

Previously, we would move entries each time they were pasted. Thus, if
you were to cut some files and pasted them in folder `a` and then `b`,
they would only occur in folder `b` and not in folder `a`. This is
unintuitive - e.g. the same does not apply to text and does not happen
in other editors.

This PR improves this behavior - after the first paste of a cut
clipboard, we change the clipboard to a copy clipboard, ensuring that
for all folloing pastes, the entries are not moved again. In the above
example, the files would then also be found in folder `a`. This is also
reflected in the added test.

Release Notes:

- Ensured that cut project panel entries are cut-pasted only on the
first use, and copy-pasted on all subsequent pastes.
```

## Parents

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

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