Fix scrollbar height

This commit is contained in:
Jeremy Soller 2023-11-16 09:11:14 -07:00
parent f0d9bc06e1
commit 125483ce04
No known key found for this signature in database
GPG key ID: DCFCA852D3906975

View file

@ -344,7 +344,7 @@ where
let start_line = start_line_opt.unwrap_or(end_line);
let lines = editor.buffer().lines.len();
let start_y = (start_line * image_h as usize) / lines;
let end_y = ((end_line * image_h as usize) / lines).max(start_y + 1);
let end_y = (((end_line + 1) * image_h as usize) / lines);
let rect = Rectangle::new(
[image_w as f32 / scale_factor, start_y as f32 / scale_factor].into(),