aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/view.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/view.rs')
-rw-r--r--helix-view/src/view.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/helix-view/src/view.rs b/helix-view/src/view.rs
index 5519d9ff..f82de90e 100644
--- a/helix-view/src/view.rs
+++ b/helix-view/src/view.rs
@@ -1,5 +1,3 @@
-use anyhow::Error;
-
use std::borrow::Cow;
use crate::{Document, DocumentId, ViewId};
@@ -63,17 +61,15 @@ pub struct View {
}
impl View {
- pub fn new(doc: DocumentId) -> Result<Self, Error> {
- let view = Self {
+ pub fn new(doc: DocumentId) -> Self {
+ Self {
id: ViewId::default(),
doc,
first_line: 0,
first_col: 0,
area: Rect::default(), // will get calculated upon inserting into tree
jumps: JumpList::new((doc, Selection::point(0))), // TODO: use actual sel
- };
-
- Ok(view)
+ }
}
pub fn ensure_cursor_in_view(&mut self, doc: &Document) {