mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-23 20:52:54 +03:00
update changes title right away
This commit is contained in:
parent
315cf615e0
commit
f4e2b7c6c0
@ -65,8 +65,7 @@ impl ChangesComponent {
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
pub fn update(&mut self, list: &[StatusItem]) -> Result<()> {
|
||||
pub fn update(&mut self) -> Result<()> {
|
||||
if self.is_working_dir {
|
||||
if let Ok(branch_name) = self.branch_name.lookup() {
|
||||
self.files.set_title(format!(
|
||||
@ -75,9 +74,12 @@ impl ChangesComponent {
|
||||
))
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
///
|
||||
pub fn set_items(&mut self, list: &[StatusItem]) -> Result<()> {
|
||||
self.files.update(list)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -202,6 +202,8 @@ impl Status {
|
||||
))?;
|
||||
self.git_status_stage
|
||||
.fetch(StatusParams::new(StatusType::Stage, true))?;
|
||||
|
||||
self.index_wd.update()?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
@ -230,10 +232,10 @@ impl Status {
|
||||
|
||||
fn update_status(&mut self) -> Result<()> {
|
||||
let status = self.git_status_stage.last()?;
|
||||
self.index.update(&status.items)?;
|
||||
self.index.set_items(&status.items)?;
|
||||
|
||||
let status = self.git_status_workdir.last()?;
|
||||
self.index_wd.update(&status.items)?;
|
||||
self.index_wd.set_items(&status.items)?;
|
||||
|
||||
self.update_diff()?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user