New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent line spacing on large files #5371
Comments
JosephTLyons
added
the
editor
Feedback for code editing, formatting, editor iterations, etc
label
Jul 21, 2022
Closed
1 task
1 task
1 task
Heh, we're simply running into float precision limits when doing layout. You love to see it. =) Gonna open up a PR shortly. |
osiewicz
added a commit
that referenced
this issue
Mar 11, 2024
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.
osiewicz
added a commit
that referenced
this issue
Mar 23, 2024
This is another attempt to fix #5371 - this time around I've exposed internal scroll_anchor used to calculate scroll_position()' y coordinate. Now, row offset calculations are performed on integrals. This makes layout precision dependant on the \# of rendered lines and not on the \# of lines as a whole.
osiewicz
added a commit
that referenced
this issue
Mar 23, 2024
This is another attempt to fix #5371 - this time around I've exposed internal scroll_anchor used to calculate scroll_position()' y coordinate. Now, row offset calculations are performed on integrals. This makes layout precision dependant on the \# of rendered lines and not on the \# of lines as a whole.
osiewicz
added a commit
that referenced
this issue
Mar 25, 2024
This is another attempt to fix #5371 - this time around I've exposed internal scroll_anchor used to calculate scroll_position()' y coordinate. Now, row offset calculations are performed on integrals. This makes layout precision dependant on the \# of rendered lines and not on the \# of lines as a whole.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The space between lines starts to become inconsistent after so many lines:
long_file.txt
The text was updated successfully, but these errors were encountered: