mirror of
https://github.com/extrawurst/gitui.git
synced 2024-12-26 18:43:37 +03:00
Draw scrollbar for long commit messages
This commit is contained in:
parent
32f9a3a4df
commit
7dc72380ce
@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
![push](assets/push.gif)
|
||||
|
||||
- scrollbar in long commit messages ([#308](https://github.com/extrawurst/gitui/issues/308))
|
||||
|
||||
### Changed
|
||||
- do not highlight selection in diff view when not focused ([#270](https://github.com/extrawurst/gitui/issues/270))
|
||||
- compact treeview [[@WizardOhio24](https://github.com/WizardOhio24)] ([#192](https://github.com/extrawurst/gitui/issues/192))
|
||||
|
@ -5,7 +5,7 @@ use crate::{
|
||||
},
|
||||
keys::SharedKeyConfig,
|
||||
strings::{self, order},
|
||||
ui::style::SharedTheme,
|
||||
ui::{self, style::SharedTheme},
|
||||
};
|
||||
use anyhow::Result;
|
||||
use asyncgit::{
|
||||
@ -356,6 +356,17 @@ impl DrawableComponent for DetailsComponent {
|
||||
chunks[1],
|
||||
);
|
||||
|
||||
if self.focused {
|
||||
ui::draw_scrollbar(
|
||||
f,
|
||||
chunks[1],
|
||||
&self.theme,
|
||||
self.get_number_of_lines(width as usize)
|
||||
.saturating_sub(height as usize),
|
||||
self.scroll_top.get(),
|
||||
)
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ impl Widget for Scrollbar {
|
||||
vertical: 1,
|
||||
});
|
||||
|
||||
if area.height <= 4 {
|
||||
if area.height < 4 {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user