diff --git a/CHANGELOG.md b/CHANGELOG.md index e89e1af6cb..59b1710c60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Set `CREATE_NO_WINDOW` flag when executing Git hooks on Windows ([#2371](https://github.com/extrawurst/gitui/pull/2371)) ### Added +* help popup scrollbar [[@wugeer](https://github.com/wugeer)](https://github.com/extrawurst/gitui/pull/2388)) * add popups for viewing, adding, updating and removing remotes [[@robin-thoene](https://github.com/robin-thoene)] ([#2172](https://github.com/extrawurst/gitui/issues/2172)) ## [0.26.3] - 2024-06-02 diff --git a/Cargo.lock b/Cargo.lock index e0e76b25c7..ce88812162 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -919,9 +919,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -929,9 +929,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" @@ -946,27 +946,27 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", diff --git a/asyncgit/src/sync/hooks.rs b/asyncgit/src/sync/hooks.rs index b692891853..3e82cf6f8d 100644 --- a/asyncgit/src/sync/hooks.rs +++ b/asyncgit/src/sync/hooks.rs @@ -26,10 +26,7 @@ impl From for HookResult { } } -/// this hook is documented here -/// we use the same convention as other git clients to create a temp file containing -/// the commit message at `<.git|hooksPath>/COMMIT_EDITMSG` and pass it's relative path as the only -/// parameter to the hook script. +/// see `git2_hooks::hooks_commit_msg` pub fn hooks_commit_msg( repo_path: &RepoPath, msg: &mut String, @@ -41,8 +38,7 @@ pub fn hooks_commit_msg( Ok(git2_hooks::hooks_commit_msg(&repo, None, msg)?.into()) } -/// this hook is documented here -/// +/// see `git2_hooks::hooks_pre_commit` pub fn hooks_pre_commit(repo_path: &RepoPath) -> Result { scope_time!("hooks_pre_commit"); @@ -51,7 +47,7 @@ pub fn hooks_pre_commit(repo_path: &RepoPath) -> Result { Ok(git2_hooks::hooks_pre_commit(&repo, None)?.into()) } -/// +/// see `git2_hooks::hooks_post_commit` pub fn hooks_post_commit(repo_path: &RepoPath) -> Result { scope_time!("hooks_post_commit"); @@ -60,7 +56,7 @@ pub fn hooks_post_commit(repo_path: &RepoPath) -> Result { Ok(git2_hooks::hooks_post_commit(&repo, None)?.into()) } -/// +/// see `git2_hooks::hooks_prepare_commit_msg` pub fn hooks_prepare_commit_msg( repo_path: &RepoPath, source: PrepareCommitMsgSource, diff --git a/git2-hooks/src/lib.rs b/git2-hooks/src/lib.rs index 43e5e18f2c..2a458856d7 100644 --- a/git2-hooks/src/lib.rs +++ b/git2-hooks/src/lib.rs @@ -112,8 +112,10 @@ fn create_hook_in_path(path: &Path, hook_script: &[u8]) { } } -/// this hook is documented here -/// we use the same convention as other git clients to create a temp file containing +/// Git hook: `commit_msg` +/// +/// This hook is documented here . +/// We use the same convention as other git clients to create a temp file containing /// the commit message at `<.git|hooksPath>/COMMIT_EDITMSG` and pass it's relative path as the only /// parameter to the hook script. pub fn hooks_commit_msg( diff --git a/src/popups/help.rs b/src/popups/help.rs index ebf687ad5e..9e9b702e71 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!(