Skip to content

Commit 1a90fd3

Browse files
cruesslerStephan Dilly
authored and
Stephan Dilly
committed
Add scrolling to commit message in details
- Manually wrap commit message using `textwrap` Closes #181
1 parent 0e81f06 commit 1a90fd3

File tree

9 files changed

+299
-34
lines changed

9 files changed

+299
-34
lines changed

Cargo.lock

+11-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ ron = "0.6"
3939
serde = "1.0"
4040
anyhow = "1.0.32"
4141
unicode-width = "0.1"
42+
textwrap = "0.12"
4243

4344
[target.'cfg(not(windows))'.dependencies]
4445
pprof = { version = "0.3", features = ["flamegraph"], optional = true }

asyncgit/src/sync/commit_details.rs

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub struct CommitMessage {
3535
}
3636

3737
impl CommitMessage {
38+
///
3839
pub fn from(s: &str) -> Self {
3940
if let Some(idx) = s.find('\n') {
4041
let (first, rest) = s.split_at(idx);

asyncgit/src/sync/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ pub mod utils;
1919
pub(crate) use branch::get_branch_name;
2020

2121
pub use commit::{amend, commit, tag};
22-
pub use commit_details::{get_commit_details, CommitDetails};
22+
pub use commit_details::{
23+
get_commit_details, CommitDetails, CommitMessage,
24+
};
2325
pub use commit_files::get_commit_files;
2426
pub use commits_info::{get_commits_info, CommitId, CommitInfo};
2527
pub use diff::get_diff_commit;

0 commit comments

Comments
 (0)