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:
co-authored by
Nathan Sobo
Max Brunsfeld
parent
c450945001
commit
377e41a90f
@@ -470,7 +470,7 @@ impl Editor {
|
||||
clone.nav_history = self
|
||||
.nav_history
|
||||
.as_ref()
|
||||
.map(|nav_history| nav_history.clone(&cx.handle()));
|
||||
.map(|nav_history| ItemNavHistory::new(nav_history.history(), &cx.handle()));
|
||||
clone
|
||||
}
|
||||
|
||||
@@ -2459,6 +2459,14 @@ impl Editor {
|
||||
self.update_selections(vec![selection], Some(Autoscroll::Fit), cx);
|
||||
}
|
||||
|
||||
pub fn set_nav_history(&mut self, nav_history: Option<ItemNavHistory>) {
|
||||
self.nav_history = nav_history;
|
||||
}
|
||||
|
||||
pub fn nav_history(&self) -> Option<&ItemNavHistory> {
|
||||
self.nav_history.as_ref()
|
||||
}
|
||||
|
||||
fn push_to_nav_history(
|
||||
&self,
|
||||
position: Anchor,
|
||||
|
||||
Reference in New Issue
Block a user