# editor: Extract \`fold\` and \`selection\` out of \`editor.rs\` \(\#56070\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 147524879e328513b0883017733462b03b27cf02

Requested commit: 147524879e328513b0883017733462b03b27cf02

Commit: 147524879e328513b0883017733462b03b27cf02

Tree: b0537b46e07a24f451afc70f921c477dd3c09b03

Author: Mikhail Pertsev

Committer: GitHub

## Message

```
editor: Extract `fold` and `selection` out of `editor.rs` (#56070)

cc @SomeoneToIgnore

## Summary

Follow-up to #56030 

This mechanically extracts two editor topics into focused sibling
modules:

- `crates/editor/src/fold.rs`
- `crates/editor/src/selection.rs`

One odd boundary remains: several selection state types still live in
`editor.rs`. I didn't move them because those caused that "huge 11k
diff" in the previous PR, so I propose to move them later.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
```

## Parents

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

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