We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e59200c commit 78b31d0Copy full SHA for 78b31d0
CHANGELOG.md
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
7
## [Unreleased]
8
9
+### Fixed
10
+- fix crash help in small window size ([#63](https://github.com/extrawurst/gitui/issues/63))
11
+
12
## [0.2.5] - 2020-05-16
13
### Added
14
- introduced proper changelog
src/ui/mod.rs
@@ -47,10 +47,10 @@ pub fn centered_rect_absolute(
47
r: Rect,
48
) -> Rect {
49
Rect::new(
50
- (r.width - width) / 2,
51
- (r.height - height) / 2,
52
- width,
53
- height,
+ (r.width.saturating_sub(width)) / 2,
+ (r.height.saturating_sub(height)) / 2,
+ width.min(r.width),
+ height.min(r.height),
54
)
55
}
56
0 commit comments