Remove redundant update part

This commit is contained in:
Kirill Bulatov 2024-11-22 01:16:06 +02:00
parent adf74b6b45
commit 1f5ac4710a
4 changed files with 4 additions and 8 deletions

View file

@ -12708,9 +12708,8 @@ impl Editor {
multi_buffer::Event::FileHandleChanged | multi_buffer::Event::Reloaded => {
cx.emit(EditorEvent::TitleChanged)
}
multi_buffer::Event::DiffBaseChanged { buffer } => {
multi_buffer::Event::DiffBaseChanged => {
self.scrollbar_marker_state.dirty = true;
self.sync_expanded_diff_hunks(buffer.clone(), cx);
cx.emit(EditorEvent::DiffBaseChanged);
cx.notify();
}

View file

@ -1061,7 +1061,7 @@ impl Item for ProjectDiffEditor {
}
}
fn breadcrumb_location(&self) -> ToolbarItemLocation {
fn breadcrumb_location(&self, _: &AppContext) -> ToolbarItemLocation {
ToolbarItemLocation::PrimaryLeft
}

View file

@ -57,7 +57,6 @@ impl GitStatus {
Some((
RepoPath(PathBuf::from(path)),
match status {
// TODO kb more: deleted, renamed, copied, etc.
"A" | "??" => GitFileStatus::Added,
"M" => GitFileStatus::Modified,
_ => return None,

View file

@ -95,9 +95,7 @@ pub enum Event {
},
Reloaded,
ReloadNeeded,
DiffBaseChanged {
buffer: Model<Buffer>,
},
DiffBaseChanged,
DiffUpdated {
buffer: Model<Buffer>,
},
@ -1745,7 +1743,7 @@ impl MultiBuffer {
language::BufferEvent::FileHandleChanged => Event::FileHandleChanged,
language::BufferEvent::Reloaded => Event::Reloaded,
language::BufferEvent::ReloadNeeded => Event::ReloadNeeded,
language::BufferEvent::DiffBaseChanged => Event::DiffBaseChanged { buffer },
language::BufferEvent::DiffBaseChanged => Event::DiffBaseChanged,
language::BufferEvent::DiffUpdated => Event::DiffUpdated { buffer },
language::BufferEvent::LanguageChanged => {
Event::LanguageChanged(buffer.read(cx).remote_id())