# editor: Make the multiline comment folding more robust \(\#54102\) · gitcafe/zed

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

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

Visibility: public

Requested revision: f4addb6a24a9aac5a94be15cdf3fd66184dd8ca0

Requested commit: f4addb6a24a9aac5a94be15cdf3fd66184dd8ca0

Commit: f4addb6a24a9aac5a94be15cdf3fd66184dd8ca0

Tree: 12674ed277f74c31947967262de523c83aec2eb7

Author: Finn Eitreim

Committer: GitHub

## Message

```
editor: Make the multiline comment folding more robust (#54102)

Basically just applied the suggested fix as described in #53606 , I also
experimented with a hackier soln. that used the same logic as the code
this is replacing, but it seemed solidly worse than this version.

The original issue extremely clear with what is going on / what needed
to be fixed.


heres a video: 

https://github.com/user-attachments/assets/e7fc60f7-0a8c-403c-877f-93f58f370b00


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

Closes #53606 

Release Notes:

- editor: Fixed incorrect inclusion of comments into folds
```

## Parents

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

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