editor: Represent scroll offset with more precision (#39367)

Closes #5355

Release Notes:

- Fixed rendering glitches with files with more than 16 million lines
(that occured due to floating number rounding errors).

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This commit is contained in:
Piotr Osiewicz
2025-10-02 23:04:31 +02:00
committed by GitHub
co-authored by Smit Barmase
parent 4c35274b6e
commit d359a814f8
61 changed files with 711 additions and 530 deletions
+4 -4
View File
@@ -303,10 +303,10 @@ impl Render for ImageView {
_cx: &mut App| {
let square_size = 32.0;
let start_y = bounds.origin.y.0;
let height = bounds.size.height.0;
let start_x = bounds.origin.x.0;
let width = bounds.size.width.0;
let start_y = bounds.origin.y.into();
let height: f32 = bounds.size.height.into();
let start_x = bounds.origin.x.into();
let width: f32 = bounds.size.width.into();
let mut y = start_y;
let mut x = start_x;