aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
authorKeith Simmons2021-06-25 03:58:15 +0000
committerGitHub2021-06-25 03:58:15 +0000
commit4418e17547562e211952b9e8585916e04b858b3b (patch)
tree8427958809392969b035967c1c69e9507207d00e /helix-view/src/editor.rs
parent74cc4b4a49e05462b2b543737ad4dc32e2265794 (diff)
reverse the dependency between helix-tui and helix-view (#366)
* reverse the dependency between helix-tui and helix-view by moving a fiew types to view * fix tests * clippy and format fixes Co-authored-by: Keith Simmons <keithsim@microsoft.com>
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 7f910b80..0a2dc54d 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -1,12 +1,10 @@
-use crate::clipboard::{get_clipboard_provider, ClipboardProvider};
use crate::{
+ clipboard::{get_clipboard_provider, ClipboardProvider},
+ graphics::{CursorKind, Rect},
theme::{self, Theme},
tree::Tree,
Document, DocumentId, RegisterSelection, View, ViewId,
};
-use helix_core::syntax;
-use tui::layout::Rect;
-use tui::terminal::CursorKind;
use futures_util::future;
use std::{path::PathBuf, sync::Arc, time::Duration};
@@ -17,6 +15,7 @@ use anyhow::Error;
pub use helix_core::diagnostic::Severity;
pub use helix_core::register::Registers;
+use helix_core::syntax;
use helix_core::Position;
#[derive(Debug)]
@@ -45,7 +44,7 @@ pub enum Action {
impl Editor {
pub fn new(
- mut area: tui::layout::Rect,
+ mut area: Rect,
themes: Arc<theme::Loader>,
config_loader: Arc<syntax::Loader>,
) -> Self {