diff options
author | bc-universe <9028220+bc-universe@users.noreply.github.com> | 2022-11-13 11:18:59 +0100 |
---|---|---|
committer | extrawurst <mail@rusticorn.com> | 2022-11-23 15:26:26 +0100 |
commit | 9b46bb63f949aae4ed0b5be5fa9f3b0a92d09266 (patch) | |
tree | 73857e77cb5259e08e1facdd3d75ef781a68b572 /src/tabs | |
parent | 8da9cfc21d93c9fdbc98966dafc785b14061ea94 (diff) |
Display commit changes (#1420)
When using an external editor to edit the commit message, the changes are now displayed
Diffstat (limited to 'src/tabs')
-rw-r--r-- | src/tabs/status.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tabs/status.rs b/src/tabs/status.rs index e17ce384..765ae1c4 100644 --- a/src/tabs/status.rs +++ b/src/tabs/status.rs @@ -21,7 +21,7 @@ use asyncgit::{ }, sync::{BranchCompare, CommitId}, AsyncBranchesJob, AsyncDiff, AsyncGitNotification, AsyncStatus, - DiffParams, DiffType, PushType, StatusParams, + DiffParams, DiffType, PushType, StatusItem, StatusParams, }; use crossbeam_channel::Sender; use crossterm::event::Event; @@ -465,6 +465,10 @@ impl Status { Ok(()) } + pub fn get_files_changes(&mut self) -> Result<Vec<StatusItem>> { + Ok(self.git_status_stage.last()?.items) + } + fn update_status(&mut self) -> Result<()> { let stage_status = self.git_status_stage.last()?; self.index.set_items(&stage_status.items)?; |