# editor: Use \`em_advance\` everywhere for horizontal scroll position computations \(\#33514\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 4c2415b3380c6d7456dba72693968adf3854d30d

Requested commit: 4c2415b3380c6d7456dba72693968adf3854d30d

Commit: 4c2415b3380c6d7456dba72693968adf3854d30d

Tree: c29b9b50bea9e796ac3ad1d19ba33673f57cf9bd

Author: Finn Evers

Committer: GitHub

## Message

```
editor: Use `em_advance` everywhere for horizontal scroll position computations (#33514)

Closes #33472

This PR fixes some regressions that were introduced in
https://github.com/zed-industries/zed/pull/32558, which updated the
editor scrolling to use `em_advance` instead of `em_width` for the
horizontal scroll position calculation.
However, not all occurrences were updated, which caused issues with wrap
guides and some small stuttering with horizontal autoscroll whilst
typing/navigating with the keyboard.

Release Notes:

- Fixed an issue where horizontal autoscrolling would stutter and indent
guides would drift when scrolling horizontally.
```

## Parents

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

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