# editor: Push \`em\` width calculations down into \`EditorSnapshot::gutter_dimensions\` \(\#24062\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 52a3013d7397124674cfaafe260cf6cb9f2ab2cd

Requested commit: 52a3013d7397124674cfaafe260cf6cb9f2ab2cd

Commit: 52a3013d7397124674cfaafe260cf6cb9f2ab2cd

Tree: 5463d39d5b3ee3341e25d33b2b7958b0f9b7a4cc

Author: Marshall Bowers

Committer: GitHub

## Message

```
editor: Push `em` width calculations down into `EditorSnapshot::gutter_dimensions` (#24062)

This PR removes the `em_width` and `em_advance` parameters to
`EditorSnapshot::gutter_dimensions` in favor of computing the values
inside of it.

In practice all of the callers were passing in the same values, and
there isn't a circumstance where we would want to pass in different
values.

`gutter_dimensions` has also been modified to return
`Option<GutterDimensions>` instead of `GutterDimensions` so that we can
remove some `.unwrap`s when interacting with the text system.

Release Notes:

- N/A
```

## Parents

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

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