# editor: Fix edit range for linked edits on do completion \(\#29650\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e697cf97475887ac67bf42b3e67395f4a332c8c9

Requested commit: e697cf97475887ac67bf42b3e67395f4a332c8c9

Commit: e697cf97475887ac67bf42b3e67395f4a332c8c9

Tree: f1c711d63c65f7c3ec67b343379f3256c620d231

Author: Smit Barmase

Committer: GitHub

## Message

```
editor: Fix edit range for linked edits on do completion (#29650)

Closes #29544

Fixes an issue where accepting an HTML completion would correctly edit
the start tag but incorrectly update the end tag due to incorrect linked
edit ranges.

I want to handle multi cursor case (as it barely works now), but seems
like this should go first. As, it might need whole `do_completions`
overhaul.

Todo:
- [x] Tests for completion aceept on linked edits

Before:


https://github.com/user-attachments/assets/917f8d2a-4a0f-46e8-a004-675fde55fe3d

After:


https://github.com/user-attachments/assets/84b760b6-a5b9-45c4-85d8-b5dccf97775f

Release Notes:

- Fixes an issue where accepting an HTML completion would correctly edit
the start tag but incorrectly update the end tag.
```

## Parents

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

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