# Fix off-by-one errors in syntax highlighting \(\#14780\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 87457f9ae8d55a579e456f480e5813f89c105af5

Requested commit: 87457f9ae8d55a579e456f480e5813f89c105af5

Commit: 87457f9ae8d55a579e456f480e5813f89c105af5

Tree: cc531254b93a29a5550888f53d3f0cc0db944026

Author: Conrad Irwin

Committer: GitHub

## Message

```
Fix off-by-one errors in syntax highlighting (#14780)

In the case that a line ended with a 0-length run, we would get our
highlights offset by one position.

Release Notes:

- Fixed syntax highlights being offset from syntax in diagnostics
popovers.
```

## Parents

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

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