summaryrefslogtreecommitdiffstats
path: root/src/interactive/widgets/main.rs
diff options
context:
space:
mode:
authorSebastian Thiel <sthiel@thoughtworks.com>2019-06-04 18:35:37 +0530
committerSebastian Thiel <sthiel@thoughtworks.com>2019-06-04 18:35:37 +0530
commit09373b26b8f6da9a3a2407a54b0735d41a960278 (patch)
tree4bc013aabe4c729893cabd359a14795c3fa263dd /src/interactive/widgets/main.rs
parent31a90d7748678448d41b025d65981097fec26af3 (diff)
Wow, help scrolling is finally working!
Diffstat (limited to 'src/interactive/widgets/main.rs')
-rw-r--r--src/interactive/widgets/main.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/interactive/widgets/main.rs b/src/interactive/widgets/main.rs
index 8be4f9a..4ff4aab 100644
--- a/src/interactive/widgets/main.rs
+++ b/src/interactive/widgets/main.rs
@@ -18,6 +18,7 @@ use tui::{
#[derive(Default)]
pub struct DrawState {
entries_list: ListState,
+ pub help_scroll: u16,
}
pub struct MainWindow<'a, 'b, 'c> {
@@ -86,11 +87,13 @@ impl<'a, 'b, 'c> Widget for MainWindow<'a, 'b, 'c> {
.draw(entries_area, buf);
if let Some((help_area, state)) = help_area_state {
- HelpPane {
+ let mut pane = HelpPane {
+ scroll: draw_state.help_scroll,
state,
border_style: help_style,
- }
- .draw(help_area, buf);
+ };
+ pane.draw(help_area, buf);
+ draw_state.help_scroll = pane.scroll;
}
Footer {