# Fix invalid highlight position for \`\(edited\)\` text \(\#9660\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 35e3935e8f33d31e9afa0a8a44154603d232baa7

Requested commit: 35e3935e8f33d31e9afa0a8a44154603d232baa7

Commit: 35e3935e8f33d31e9afa0a8a44154603d232baa7

Tree: 20f92c3387f73f1e376f780df550a77cbe6f1071

Author: Remco Smits

Committer: GitHub

## Message

```
Fix invalid highlight position for `(edited)` text (#9660)

This pull request fixes a bug that was inserting the wrong position for
the `(edited)` text. This is only an issue when you have other styling
inside the markdown that causes the `richt_text.text.len()` to increase.

**Before**
<img wdth="234" alt="Screenshot 2024-03-21 at 19 53 34"
src="https://github.com/zed-industries/zed/assets/62463826/bf9e7fec-1563-415b-9b14-f7b95fc7d784">
**After**
<img width="234" alt="Screenshot 2024-03-21 at 19 53 48"
src="https://github.com/zed-industries/zed/assets/62463826/c0b7ba3a-5bdc-4b9e-a4f2-c3df4064f0ec">

Release Notes:

- N/A
```

## Parents

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

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