mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-23 03:32:30 +03:00
fix crash on small terminals (closes #307)
This commit is contained in:
parent
2434af55bd
commit
32f9a3a4df
@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Fixed
|
||||
- crash when changing git repo while gitui is open ([#271](https://github.com/extrawurst/gitui/issues/271))
|
||||
- crash on small terminal size ([#307](https://github.com/extrawurst/gitui/issues/307))
|
||||
|
||||
## [0.10.1] - 2020-09-01
|
||||
|
||||
|
@ -35,7 +35,7 @@ pub struct CommandBar {
|
||||
expanded: bool,
|
||||
}
|
||||
|
||||
const MORE_WIDTH: u16 = 11;
|
||||
const MORE_WIDTH: u16 = 9;
|
||||
|
||||
impl CommandBar {
|
||||
pub const fn new(
|
||||
@ -139,6 +139,10 @@ impl CommandBar {
|
||||
}
|
||||
|
||||
pub fn draw<B: Backend>(&self, f: &mut Frame<B>, r: Rect) {
|
||||
if r.width < MORE_WIDTH {
|
||||
return;
|
||||
}
|
||||
|
||||
let splitter = Text::Raw(Cow::from(strings::cmd_splitter(
|
||||
&self.key_config,
|
||||
)));
|
||||
|
Loading…
Reference in New Issue
Block a user