# Drop active searchable item subscription when changing active item \(\#4220\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8ce7594a26c212a0680a23aeba361ff61bd6d1e5

Requested commit: 8ce7594a26c212a0680a23aeba361ff61bd6d1e5

Commit: 8ce7594a26c212a0680a23aeba361ff61bd6d1e5

Tree: 8e803c1c4cd6c462a007abda919019ed117843db

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Drop active searchable item subscription when changing active item (#4220)

We were leaking the previous active item's subscription, which meant
that we would receive the `MatchesInvalidated` event as many times as we
changed items.

Release Notes:

- Fixed a performance issue when switching the active item while the
search bar was open.
```

## Parents

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

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

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