parent
8e17b34eff
commit
836661503f
2 changed files with 58 additions and 26 deletions
|
@ -2297,7 +2297,7 @@ impl EventEmitter<Event> for GitPanel {}
|
|||
impl EventEmitter<PanelEvent> for GitPanel {}
|
||||
|
||||
pub(crate) struct GitPanelAddon {
|
||||
pub(crate) git_panel: Entity<GitPanel>,
|
||||
pub(crate) workspace: WeakEntity<Workspace>,
|
||||
}
|
||||
|
||||
impl editor::Addon for GitPanelAddon {
|
||||
|
@ -2312,9 +2312,11 @@ impl editor::Addon for GitPanelAddon {
|
|||
cx: &App,
|
||||
) -> Option<AnyElement> {
|
||||
let file = excerpt_info.buffer.file()?;
|
||||
let git_panel = self.git_panel.read(cx);
|
||||
let git_panel = self.workspace.upgrade()?.read(cx).panel::<GitPanel>(cx)?;
|
||||
|
||||
git_panel.render_buffer_header_controls(&self.git_panel, &file, window, cx)
|
||||
git_panel
|
||||
.read(cx)
|
||||
.render_buffer_header_controls(&git_panel, &file, window, cx)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue