Fix scrollbar height
This commit is contained in:
parent
f0d9bc06e1
commit
125483ce04
1 changed files with 1 additions and 1 deletions
|
|
@ -344,7 +344,7 @@ where
|
||||||
let start_line = start_line_opt.unwrap_or(end_line);
|
let start_line = start_line_opt.unwrap_or(end_line);
|
||||||
let lines = editor.buffer().lines.len();
|
let lines = editor.buffer().lines.len();
|
||||||
let start_y = (start_line * image_h as usize) / lines;
|
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(
|
let rect = Rectangle::new(
|
||||||
[image_w as f32 / scale_factor, start_y as f32 / scale_factor].into(),
|
[image_w as f32 / scale_factor, start_y as f32 / scale_factor].into(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue