From f8bc1a2ce44e5e6bda41864bb9a714706a992e0c Mon Sep 17 00:00:00 2001 From: Keith Simmons Date: Thu, 23 Jan 2020 17:47:26 -0800 Subject: [PATCH] emojis working --- Cargo.lock | 1 + Cargo.toml | 1 + src/editor/mod.rs | 41 ++++++++++++++++++---------- src/renderer/caching_shaper.rs | 47 ++++++++++----------------------- src/renderer/cursor_renderer.rs | 20 +++++++++++--- src/renderer/mod.rs | 10 +++++-- 6 files changed, 67 insertions(+), 53 deletions(-) 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