Reuse views when moving between diagnostic view and editors

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld
2022-01-07 11:00:12 -08:00
co-authored by Nathan Sobo
parent ea263822fa
commit ce6f3d7f3e
6 changed files with 103 additions and 21 deletions
+4
View File
@@ -62,6 +62,10 @@ impl ItemHandle for BufferItemHandle {
Box::new(self.clone())
}
fn to_any(&self) -> gpui::AnyModelHandle {
self.0.clone().into()
}
fn downgrade(&self) -> Box<dyn workspace::WeakItemHandle> {
Box::new(WeakBufferItemHandle(self.0.downgrade()))
}