Use the new split pane's navigation history when cloning an item

This commit is contained in:
Antonio Scandurra
2022-02-25 17:22:30 +01:00
parent 88bfe5acb0
commit b506db7c93
6 changed files with 67 additions and 34 deletions
+6 -2
View File
@@ -194,11 +194,15 @@ impl ItemView for Editor {
})
}
fn clone_on_split(&self, cx: &mut ViewContext<Self>) -> Option<Self>
fn clone_on_split(
&self,
nav_history: ItemNavHistory,
cx: &mut ViewContext<Self>,
) -> Option<Self>
where
Self: Sized,
{
Some(self.clone(cx))
Some(self.clone(nav_history, cx))
}
fn deactivated(&mut self, cx: &mut ViewContext<Self>) {