mirror of
https://github.com/extrawurst/gitui.git
synced 2024-12-24 17:45:00 +03:00
update diff after commit
This commit is contained in:
parent
3ce4a51b04
commit
55e9fe643b
@ -138,6 +138,7 @@ impl App {
|
||||
pub fn event(&mut self, ev: Event) {
|
||||
trace!("event: {:?}", ev);
|
||||
if self.commit.event(ev) {
|
||||
self.update_diff();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -221,6 +222,8 @@ impl App {
|
||||
),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
self.diff.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,11 @@ impl DiffComponent {
|
||||
self.current_path.clone()
|
||||
}
|
||||
///
|
||||
pub fn clear(&mut self) {
|
||||
self.current_path.clear();
|
||||
self.diff = Diff::default();
|
||||
}
|
||||
///
|
||||
pub fn update(&mut self, path: String, diff: Diff) {
|
||||
self.current_path = path;
|
||||
if diff != self.diff {
|
||||
|
Loading…
Reference in New Issue
Block a user