From 1cf887dea93f7aa2184772fa2073751f031c5bf3 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Sun, 14 Mar 2021 10:04:03 +0900 Subject: Cleanup: use doc.selection() instead of doc.state.selection(). --- helix-view/src/view.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-view/src') diff --git a/helix-view/src/view.rs b/helix-view/src/view.rs index 15f0171f..5b269a9a 100644 --- a/helix-view/src/view.rs +++ b/helix-view/src/view.rs @@ -36,7 +36,7 @@ impl View { } pub fn ensure_cursor_in_view(&mut self) { - let cursor = self.doc.state.selection().cursor(); + let cursor = self.doc.selection().cursor(); let line = self.doc.text().char_to_line(cursor); let document_end = self.first_line + (self.area.height as usize).saturating_sub(2); -- cgit v1.2.3-70-g09d2