# editor: Hide horizontal scrollbar if not visible \(\#23337\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c929533e0045fe05606c0d39e3cb82ac7d230a30

Requested commit: c929533e0045fe05606c0d39e3cb82ac7d230a30

Commit: c929533e0045fe05606c0d39e3cb82ac7d230a30

Tree: c3523be209e8716bfc296cfa72db90506fc42290

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
editor: Hide horizontal scrollbar if not visible (#23337)

This PR fixes two visual issues, that were caused by the fact that we
were always painting the horizontal scrollbar even if there is no
horizontal scrolling possible

Obscuring deleted lines when using the inline assistant:

https://github.com/user-attachments/assets/f8460c3f-403e-40a6-8622-65268ba2d875

Cutting off text even when horizontal scrolling is not possible:

https://github.com/user-attachments/assets/23c909f7-1c23-4693-8edc-40a2f089d4a8

This issue was only present in some themes (e.g. Nord, Catpuccin)


Closes #22716

Release Notes:

- Fixed an issue where horizontal scrollbars of editors would always be
painted (even if there is no horizontal scrolling to be done)
```

## Parents

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

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