improve: show whole-diff totals alongside file stats

This commit is contained in:
Valdemar Lorenzen
2026-10-20 12:29:06 +02:00
parent a5a246db77
commit 759947736e
15 changed files with 394 additions and 48 deletions
+7
View File
@@ -1887,6 +1887,7 @@ fn hidden_tab_diff_results_restore_visible_insert_interaction_and_route_request_
editable_paths: Default::default(),
files: vec![ChangedFile {
review_revisions: None,
stats: None,
loaded: true,
path: "file.txt".into(),
old_path: None,
@@ -3053,6 +3054,7 @@ fn working_diff(editor: &mut Editor, root: &Path, paths: &[&str]) -> Box<[(PathB
let lines: Vec<String> = text.lines().map(str::to_owned).collect();
ChangedFile {
review_revisions: None,
stats: None,
loaded: true,
path: PathBuf::from(*path),
old_path: None,
@@ -3115,6 +3117,7 @@ fn historical_diff(editor: &mut Editor, root: &Path, before: Vec<String>, after:
editable_paths: Default::default(),
files: vec![ChangedFile {
review_revisions: None,
stats: None,
loaded: true,
path: "file.txt".into(),
old_path: None,
@@ -4078,6 +4081,7 @@ fn bookmark_refresh_reloads_paths_and_preserves_view_until_lazy_content_arrives(
let cursor = editor.cursor();
let file = |path: &str, loaded| ChangedFile {
review_revisions: None,
stats: None,
path: path.into(),
old_path: None,
status: FileStatus::Modified,
@@ -4288,6 +4292,7 @@ fn completed_working_refresh_serializes_lazy_selection_and_invalidates_pending_n
if changed {
let file = crate::diff::ChangedFile {
review_revisions: None,
stats: None,
path: "nested/new.txt".into(),
old_path: Some("nested/old.txt".into()),
status: crate::diff::FileStatus::Renamed,
@@ -4329,6 +4334,7 @@ fn lazy_lsp_target(editor: &mut Editor) -> crate::diff::ChangedFile {
let comparison = diff.comparison.as_mut().unwrap();
comparison.files.push(ChangedFile {
review_revisions: None,
stats: None,
path: "nested/new.txt".into(),
old_path: Some("nested/old.txt".into()),
status: FileStatus::Renamed,
@@ -4350,6 +4356,7 @@ fn lazy_lsp_target(editor: &mut Editor) -> crate::diff::ChangedFile {
));
ChangedFile {
review_revisions: None,
stats: None,
path: "nested/new.txt".into(),
old_path: Some("nested/old.txt".into()),
status: FileStatus::Renamed,