Push to navigation history based on jump distance instead of time

This commit is contained in:
Max Brunsfeld
2022-01-18 15:02:49 -08:00
parent 16b82d59f1
commit f7326b8d74
4 changed files with 61 additions and 62 deletions
+3 -1
View File
@@ -149,7 +149,9 @@ impl ItemView for Editor {
}
fn deactivated(&mut self, cx: &mut ViewContext<Self>) {
self.push_to_navigation_history(cx);
if let Some(selection) = self.newest_selection_internal() {
self.push_to_navigation_history(selection.head(), None, cx);
}
}
fn is_dirty(&self, cx: &AppContext) -> bool {