# ui: Fix panic in \`highlight_ranges\` when given an oob index \(\#39051\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5ce7eda8d2c49f3d906e575c8deda538694a7fd6

Requested commit: 5ce7eda8d2c49f3d906e575c8deda538694a7fd6

Commit: 5ce7eda8d2c49f3d906e575c8deda538694a7fd6

Tree: fd0f64de60ae4330b7b30a65e9690b7eba1cc1e5

Author: Lukas Wirth

Committer: GitHub

## Message

```
ui: Fix panic in `highlight_ranges` when given an oob index (#39051)

Fixes ZED-1QW

Release Notes:

- Fixed a panic when highlighting labels
```

## Parents

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

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