# Prevent stale related excerpts by avoiding storing their contents as strings \(\#46666\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d67c8f2884d217c811c3b6e9f2a92d83f54212e5

Requested commit: d67c8f2884d217c811c3b6e9f2a92d83f54212e5

Commit: d67c8f2884d217c811c3b6e9f2a92d83f54212e5

Tree: 4a7c32e290b6172c769978694eda7fef0f722a60

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Prevent stale related excerpts by avoiding storing their contents as strings (#46666)

This fixes an issue that we noticed in particular with Mercury edit
predictions.

* [x] fix storage to not go stale
* [x] exclude excerpts that intersect the cursor excerpt
* [x] see if string representation of excerpts can be cached, to avoid
rebuilding it on every prediction

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
```

## Parents

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

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