# editor: Do not show document highlights when selection is spanned more than word \(\#30602\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 229f3dab22ea16d4e956b34c1c09a27744ab9d96

Requested commit: 229f3dab22ea16d4e956b34c1c09a27744ab9d96

Commit: 229f3dab22ea16d4e956b34c1c09a27744ab9d96

Tree: 846d196f25040a3a13308bec7664f71a3ea5271e

Author: Smit Barmase

Committer: GitHub

## Message

```
editor: Do not show document highlights when selection is spanned more than word (#30602)

Closes #27743

This PR prevents document highlighting when selection start and
selection end do not point to the same word. This is useful in cases
when you select multiple lines or multiple words, in which case you
don't really care about these LSP-specific highlights. This is the same
behavior as VSCode.


https://github.com/user-attachments/assets/f80d6ca3-d5c8-4d7b-9281-c1d6dc6a6e7b

Release Notes:

- Fixed document highlight behavior so it no longer appears when
selecting multiple words or lines, making text selection and selection
highlights more clearer.
```

## Parents

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

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