Make navigation history work with project diagnostics

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-01-20 18:21:48 +01:00
parent c450945001
commit 377e41a90f
3 changed files with 50 additions and 11 deletions

View file

@ -551,11 +551,8 @@ impl ItemNavHistory {
}
}
pub fn clone<T: ItemView>(&self, item_view: &ViewHandle<T>) -> Self {
Self {
history: self.history.clone(),
item_view: Rc::new(item_view.downgrade()),
}
pub fn history(&self) -> Rc<RefCell<NavHistory>> {
self.history.clone()
}
pub fn push<D: 'static + Any>(&self, data: Option<D>) {