# Avoid panic with outline highlight ranges · gitcafe/zed

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

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

Visibility: public

Requested revision: 9a2fd184256e5b6b8df01dab240198f7904ace28

Requested commit: 9a2fd184256e5b6b8df01dab240198f7904ace28

Commit: 9a2fd184256e5b6b8df01dab240198f7904ace28

Tree: f7d5a341eb626527118d314f15661e3ee0be88df

Author: Julia

Committer: Julia

## Message

```
Avoid panic with outline highlight ranges

Previously we were using a function in `editor` to combine syntax
highlighting and fuzzy match positions, it would operate on the full
text as put into the label. However we now have a method `ranges` on
`StringMatch` itself which operates on just the match text.

The outline view has some pretty specific behavior around path/normal
matches and how they are highlighted. So let's just give the match the
full text before it leaves the search function so it can freely index

```

## Parents

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

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