diff --git a/Cargo.lock b/Cargo.lock index 825affd..f3bcc40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1485,6 +1485,7 @@ dependencies = [ "skribo", "skulpin", "tokio", + "unicode-segmentation", "winres", ] diff --git a/Cargo.toml b/Cargo.toml index 563937c..194525b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,7 @@ nvim-rs = { git = "https://github.com/KillTheMule/nvim-rs", branch = "futures", tokio = { version = "0.2.9", features = [ "blocking", "process", "time" ] } async-trait = "0.1.18" lazy_static = "1.4.0" +unicode-segmentation = "1.6.0" [build-dependencies] winres = "0.1.11" diff --git a/src/editor/mod.rs b/src/editor/mod.rs index 87ef674..7191194 100644 --- a/src/editor/mod.rs +++ b/src/editor/mod.rs @@ -6,6 +6,7 @@ use std::sync::{Arc, Mutex}; use skulpin::skia_safe::colors; use skulpin::winit::window::Window; +use unicode_segmentation::UnicodeSegmentation; pub use cursor::{Cursor, CursorShape, CursorMode}; pub use style::{Colors, Style}; @@ -17,7 +18,7 @@ lazy_static! { pub static ref EDITOR: Arc> = Arc::new(Mutex::new(Editor::new())); } -pub type GridCell = Option<(char, Option