summaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 61abd482..02199255 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -1,6 +1,5 @@
use crate::theme::Theme;
-use crate::View;
-use helix_core::State;
+use crate::{Document, View};
use std::path::PathBuf;
@@ -27,8 +26,8 @@ impl Editor {
pub fn open(&mut self, path: PathBuf, size: (u16, u16)) -> Result<(), Error> {
let pos = self.views.len();
- let state = State::load(path, self.theme.scopes())?;
- self.views.push(View::new(state, size)?);
+ let doc = Document::load(path, self.theme.scopes())?;
+ self.views.push(View::new(doc, size)?);
self.focus = pos;
Ok(())
}