Skip to content

Commit a85e503

Browse files
committed
Add options handling in log view gitui-org#1661
1 parent 49cd7ea commit a85e503

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/app.rs

+1
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ impl App {
180180
sender,
181181
theme.clone(),
182182
key_config.clone(),
183+
options.clone(),
183184
),
184185
compare_commits_popup: CompareCommitsComponent::new(
185186
&repo,

src/components/inspect_commit.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ use super::{
66
use crate::{
77
accessors,
88
keys::{key_match, SharedKeyConfig},
9+
options::SharedOptions,
910
queue::{InternalEvent, Queue, StackablePopupOpen},
1011
strings,
1112
ui::style::SharedTheme,
1213
};
1314
use anyhow::Result;
1415
use asyncgit::{
15-
sync::{diff::DiffOptions, CommitId, CommitTags, RepoPathRef},
16+
sync::{CommitId, CommitTags, RepoPathRef},
1617
AsyncDiff, AsyncGitNotification, DiffParams, DiffType,
1718
};
1819
use crossbeam_channel::Sender;
@@ -61,6 +62,7 @@ pub struct InspectCommitComponent {
6162
git_diff: AsyncDiff,
6263
visible: bool,
6364
key_config: SharedKeyConfig,
65+
options: SharedOptions,
6466
}
6567

6668
impl DrawableComponent for InspectCommitComponent {
@@ -208,6 +210,7 @@ impl InspectCommitComponent {
208210
sender: &Sender<AsyncGitNotification>,
209211
theme: SharedTheme,
210212
key_config: SharedKeyConfig,
213+
options: SharedOptions,
211214
) -> Self {
212215
Self {
213216
queue: queue.clone(),
@@ -229,6 +232,7 @@ impl InspectCommitComponent {
229232
git_diff: AsyncDiff::new(repo.borrow().clone(), sender),
230233
visible: false,
231234
key_config,
235+
options,
232236
}
233237
}
234238

@@ -272,7 +276,7 @@ impl InspectCommitComponent {
272276
diff_type: DiffType::Commit(
273277
request.commit_id,
274278
),
275-
options: DiffOptions::default(),
279+
options: self.options.borrow().diff_options(),
276280
};
277281

278282
if let Some((params, last)) =

0 commit comments

Comments
 (0)