Skip to content

Commit

Permalink
fix: possible panic
Browse files Browse the repository at this point in the history
  • Loading branch information
nik-rev committed Jan 16, 2025
1 parent bab9fe6 commit c7cf321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-view/src/graphics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl Rect {

#[inline]
pub fn center(self) -> u16 {
self.x + (self.width / 2)
self.x.saturating_add(self.width.saturating_div(2))
}

#[inline]
Expand Down

0 comments on commit c7cf321

Please sign in to comment.