# Avoid unnecessary code action requests when applying leader updates t… \(\#2489\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ffe35d171c056bb08277896bd727cc02b6927aa2

Requested commit: ffe35d171c056bb08277896bd727cc02b6927aa2

Commit: ffe35d171c056bb08277896bd727cc02b6927aa2

Tree: e92851378d09a374b3483def1c37be5f37177f6a

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Avoid unnecessary code action requests when applying leader updates t… (#2489)

We noticed a huge amount of code actions requests being issued by
followers when applying leader updates. It was caused by a call to
`MultiBuffer::remove_excerpts` with an empty list of excerpts to remove.
This PR fixes that by avoiding emitting spurious events when multibuffer
excerpt manipulation methods are called with empty lists.
```

## Parents

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

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

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