# Respect \`scrollbar.show\` setting in Markdown preview \(\#60410\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 027cf0def75e5c027504f402a6a6c0dcac11f178

Requested commit: 027cf0def75e5c027504f402a6a6c0dcac11f178

Commit: 027cf0def75e5c027504f402a6a6c0dcac11f178

Tree: 77a8088928c6adc2e85d0f0588f265899b59efad

Author: Akshit Joshi

Committer: GitHub

## Message

```
Respect `scrollbar.show` setting in Markdown preview (#60410)

The markdown preview used `vertical_scrollbar_for()` which always sets
the scrollbar to auto-hide mode, ignoring the user's `scrollbar.show`
setting.

This fix uses
`Scrollbars::for_settings::<EditorSettingsScrollbarProxy>()` so the
markdown preview respects the same editor scrollbar visibility setting
as regular editor panes (always, auto, system, never).

Changes:

- Replaced `vertical_scrollbar_for()` with `custom_scrollbars()` +
`Scrollbars::for_settings::<EditorSettingsScrollbarProxy>()` in the
markdown preview render method

Fixes #60380

Release Notes:

- Fixed `scrollbar.show` setting not being respected in Markdown
previews

---------

Co-authored-by: Akshit Jain <akshitj11@users.noreply.github.com>
Co-authored-by: MrSubidubi <finn@zed.dev>
```

## Parents

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

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