# Refactor item-closing actions \(\#31838\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 24e4446cd35a7946674c8993cc14138d4b67e194

Requested commit: 24e4446cd35a7946674c8993cc14138d4b67e194

Commit: 24e4446cd35a7946674c8993cc14138d4b67e194

Tree: 9eee7e1e3a60c9c5d8acd87ed3d8f131ea6e10c6

Author: Joseph T\. Lyons

Committer: GitHub

## Message

```
Refactor item-closing actions (#31838)

While working on 

- https://github.com/zed-industries/zed/pull/31783
- https://github.com/zed-industries/zed/pull/31786

... I noticed some areas that could be improved through refactoring. The
bug in https://github.com/zed-industries/zed/pull/31783 came from having
duplicate code. The fix had been applied to one version, but not the
duplicated code.

This PR attempts to do some initial clean up, through some refactoring.

Release Notes:

- N/A
```

## Parents

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

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