# editor: Rearrange float operations in layout \(\#9176\) · gitcafe/zed

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

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

Visibility: public

Requested revision: f9f9f0670fb81eb0c9e31ccc68d1104dcaad4883

Requested commit: f9f9f0670fb81eb0c9e31ccc68d1104dcaad4883

Commit: f9f9f0670fb81eb0c9e31ccc68d1104dcaad4883

Tree: 4db9227e2140754b9ac962718e1dec692d243b5e

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
editor: Rearrange float operations in layout (#9176)

We were seeing weird layouts with large files, where - starting with
some verylargelineindex - lines were rendered at weird y offsets. It
turned out that in some cases we're doing operations on Pixel values of
different magnitude, which then led to wrong results in calculations.
This commit addresses some of these problems, visible at glance when
working with large plaintext files. I *did not* dig into things like
inlay hints or diagnostics to see if they are subject to the same
potential precision loss.

Fixes #5371 

Release Notes:

- Fixed editor layout for large files, where the lines might have been
laid out with incorrect Y offset from the top.
```

## Parents

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

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