From fb1ba7c0b952a351b30e1ea9b50d7e2298d53c72 Mon Sep 17 00:00:00 2001 From: wugeer <1284057728@qq.com> Date: Sat, 19 Oct 2024 00:07:35 +0800 Subject: [PATCH] feat: help popup display viewing progress (#2388) --- CHANGELOG.md | 1 + src/popups/help.rs | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e89e1af6..0de765f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ Checkout [THEMES.md](./THEMES.md) for more info. ### Added * due to github runner changes, the regular mac build is now arm64, so we added support for intel x86 apple build in nightlies and releases (via separat artifact) * support `BUILD_GIT_COMMIT_ID` enabling builds from `git archive` generated source tarballs or other outside a git repo [[@alerque](https://github.com/alerque)] ([#2187](https://github.com/extrawurst/gitui/pull/2187)) +* support help popup display viewing progress[[@wugeer](https://github.com/wugeer)](https://github.com/extrawurst/gitui/pull/2388)) ### Fixes * update yanked dependency to `libc` to fix building with `--locked`. diff --git a/src/popups/help.rs b/src/popups/help.rs index ebf687ad..9e9b702e 100644 --- a/src/popups/help.rs +++ b/src/popups/help.rs @@ -67,6 +67,15 @@ impl DrawableComponent for HelpPopup { chunks[0], ); + ui::draw_scrollbar( + f, + area, + &self.theme, + self.cmds.len(), + self.selection as usize, + ui::Orientation::Vertical, + ); + f.render_widget( Paragraph::new(Line::from(vec![Span::styled( Cow::from(format!(