# Fix inlay hint cleanup on excerpts removal \(\#40738\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 32a442d5229f58204df365da6c33796b03179474

Requested commit: 32a442d5229f58204df365da6c33796b03179474

Commit: 32a442d5229f58204df365da6c33796b03179474

Tree: 70395195d858f421e31d4178b9f21b3990f4bf57

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Fix inlay hint cleanup on excerpts removal (#40738)

A cherry-pick of
https://github.com/zed-industries/zed/pull/40183/commits/f5188d55fbcbb3856038967bce8e824ddb42bdba

This fixes a hard-to-reproduce crash caused excerpts removal not
updating previous snapshot data after corresponding inlay data was
removed.
Same branch has a test:
https://github.com/zed-industries/zed/pull/40183/commits/8783a9eb4fbc60e3fbe0654c2d330bddfaa7ef0a
that does not fail on `main` due to different way inlays are queried, it
will be merged later.

Release Notes:

- N/A
```

## Parents

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

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