mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
fix crash in help popup (closes #63)
This commit is contained in:
parent
e59200ceea
commit
78b31d046b
2 changed files with 7 additions and 4 deletions
|
|
@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
- fix crash help in small window size ([#63](https://github.com/extrawurst/gitui/issues/63))
|
||||
|
||||
## [0.2.5] - 2020-05-16
|
||||
### Added
|
||||
- introduced proper changelog
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@ pub fn centered_rect_absolute(
|
|||
r: Rect,
|
||||
) -> Rect {
|
||||
Rect::new(
|
||||
(r.width - width) / 2,
|
||||
(r.height - height) / 2,
|
||||
width,
|
||||
height,
|
||||
(r.width.saturating_sub(width)) / 2,
|
||||
(r.height.saturating_sub(height)) / 2,
|
||||
width.min(r.width),
|
||||
height.min(r.height),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue