Skip to content

Commit

Permalink
Fix scrollbar height
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Nov 16, 2023
1 parent f0d9bc0 commit 125483c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/text_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 125483c

Please sign in to comment.