# Properly deduplicate overlapping range formatting results \(\#62935\) · gitcafe/zed

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

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

Visibility: public

Requested revision: deb194b49b34793d512f0a6379a020f06dbb48e0

Requested commit: deb194b49b34793d512f0a6379a020f06dbb48e0

Commit: deb194b49b34793d512f0a6379a020f06dbb48e0

Tree: b6c8f3a352610bda2fec52d7a487a54bddae9018

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Properly deduplicate overlapping range formatting results (#62935)

Fixes https://github.com/zed-industries/zed/issues/62780

When formatting changed-only regions, we have received formatting
changes that are larger than the regions submitted.
Previous code merged only adjacent hunks in a single response, without
merging anything else, e.g. multiple responses' ranges that overlapped.

Release Notes:

- Fixed overlapping range format results duplicating the text
```

## Parents

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

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