# Fix scrollbar marker settings \(\#10530\) · gitcafe/zed

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

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

Visibility: public

Requested revision: f3192b6fa6ccfd2335f041776981166c45ecdf03

Requested commit: f3192b6fa6ccfd2335f041776981166c45ecdf03

Commit: f3192b6fa6ccfd2335f041776981166c45ecdf03

Tree: b82765aa83993c0f01b8ce937430347f77c38f7d

Author: Andrew Lygin

Committer: GitHub

## Message

```
Fix scrollbar marker settings (#10530)

Zed displays scrollbar markers of three types: git diffs, background
highlights and diagnostics. At the moment, the "background highlights"
markers are displayed for all the supported highlights:

- Occurences of the symbol under cursor.
- Search results.
- Scope boundaries (only works when a symbol is selected).
- Active hover popover position.

They all use the same color, which leads to confusing results. For
instance, in the following case I expect to see markers for the
`new_anchor` occurences in lines 43 and 47. But besides them, there're
also scope-markers for `ScrollAnchor` initialization block in lines 46
and 49, which makes me think that there're four places where
`new_anchor` appears.

<img width="740" alt="zed-scrollbar-markers"
src="https://github.com/zed-industries/zed/assets/2101250/78700e6b-fdd1-4c2f-beff-e564d8defc13">

Existing settings `selection` and `symbol_selection` in the `scrollbar`
section [don't work as
expected](https://github.com/zed-industries/zed/pull/10080#discussion_r1552325493),
which increases confusion.

This PR only leaves two types of bg-highlight-markers and provides
dedicated settings for them:

- Occurences of the symbol under cursor. Setting: `selected_symbol`,
default is `true`.
- Search results. Setting: `search_results`, default is `true`.

The `selection` and `symbol_selection` settings are not used anymore.

Release Notes:

- Breaking changes. Settings `selection` and `symbol_selection` in the
`scrollbar` section renamed to `search_results` and `selected_symbol`
respectively. Fixed the effect of these settings on which markers are
displayed on the scrollbar.

Optionally, include screenshots / media showcasing your addition that
can be included in the release notes.

- N/A

/cc @mrnugget
```

## Parents

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

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