on master help sign in
Re-export unicode crates from helix_core
commite9a3245aae0e4380201cffcff7ebe06c129823c5 authorBlaž Hrastnik <blaz@mxxn.io> dateFri 18 Jun 2021, 17:47 (5 years ago) parent9275021
4 files changed+10−9
Cargo.lock−2 helix-core/src/lib.rs+6−2 helix-term/Cargo.toml−3 helix-term/src/ui/prompt.rs+4−2
Cargo.lock−2
@@ -329,8 +329,6 @@ dependencies = [
329329 "serde_json",
330330 "tokio",
331331 "toml",
332− "unicode-segmentation",
333− "unicode-width",
334332]
335333
336334[[package]]
helix-core/src/lib.rs+6−2
@@ -18,6 +18,12 @@ mod state;
1818pub mod syntax;
1919mod transaction;
2020
21+pub mod unicode {
22+ pub use unicode_general_category as category;
23+ pub use unicode_segmentation as segmentation;
24+ pub use unicode_width as width;
25+}
26+
2127static RUNTIME_DIR: once_cell::sync::Lazy<std::path::PathBuf> =
2228 once_cell::sync::Lazy::new(runtime_dir);
2329
@@ -97,8 +103,6 @@ pub use ropey::{Rope, RopeSlice};
97103
98104pub use tendril::StrTendril as Tendril;
99105
100−pub use unicode_general_category::get_general_category;
101−
102106#[doc(inline)]
103107pub use {regex, tree_sitter};
104108
helix-term/Cargo.toml−3
@@ -54,6 +54,3 @@ toml = "0.5"
5454
5555serde_json = "1.0"
5656serde = { version = "1.0", features = ["derive"] }
57−
58−unicode-segmentation = "1.7"
59−unicode-width = "0.1"
helix-term/src/ui/prompt.rs+4−2
@@ -6,8 +6,10 @@ use helix_view::{Editor, Theme};
66use std::{borrow::Cow, ops::RangeFrom};
77use tui::terminal::CursorKind;
88
9−use unicode_segmentation::{GraphemeCursor, GraphemeIncomplete};
10−use unicode_width::UnicodeWidthStr;
9+use helix_core::{
10+ unicode::segmentation::{GraphemeCursor, GraphemeIncomplete},
11+ unicode::width::UnicodeWidthStr,
12+};
1113
1214pub type Completion = (RangeFrom<usize>, Cow<'static, str>);
1315