# Scrollbar markers for cursors \(\#10816\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 1aa9c868d4b12d674a8c9f67f5b857d6558fd7e7

Requested commit: 1aa9c868d4b12d674a8c9f67f5b857d6558fd7e7

Commit: 1aa9c868d4b12d674a8c9f67f5b857d6558fd7e7

Tree: 2ab05df6346187fe0a4d727d81db42d77e7282eb

Author: Andrew Lygin

Committer: GitHub

## Message

````
Scrollbar markers for cursors (#10816)

How it looks:

https://github.com/zed-industries/zed/assets/2101250/f564111c-1019-4442-b8a6-de338e12b12e

This PR adds cursor markers to the scrollbar. They work similar to
VSCode:

1. A cursor marker takes the whole scrollbar width.
2. It's always 2px high.
3. It uses the player's `cursor` color, so it may be helpful in the
collaboration mode.

There's a setting to switch cursor markers on/off:

```json
{
  "scrollbar": {
    "cursors": true
  }
}
```

Implementation details:

- Unlike other markers, cursor markers are displayed synchronously.
Otherwise they don't feel smooth and sometimes freez on prolonged
up/down navigation.
- Cursor markers are automatically switched off when it's more than 100
of them.
- The minimum (non-cursor) marker height is now 5px. It allows the user
to see other markers under the cursor marker.
- The way the minimum height is imposed on markers has changed a bit to
keep consistency between markers of different types.
- Selected symbol markers use less vibrant color (`info` faded out a
little).

Release Notes:

- Added displaying of cursor markers in the scrollbar. They can be
switched on/off by the `scrollbar.cursors` setting.


````

## Parents

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

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