From 2376fc875e659dfce952c0b885e369b4295ba441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Thu, 17 Mar 2022 10:52:14 +0900 Subject: [PATCH] Temporarily turn on unicode-lines Ropey's non-unicode lines impl has some bugs still --- helix-core/Cargo.toml | 1 + helix-core/src/chars.rs | 5 ++++- helix-term/Cargo.toml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/helix-core/Cargo.toml b/helix-core/Cargo.toml index 050bc8abd..20bc6fb8f 100644 --- a/helix-core/Cargo.toml +++ b/helix-core/Cargo.toml @@ -11,6 +11,7 @@ homepage = "https://helix-editor.com" include = ["src/**/*", "README.md"] [features] +default = ["unicode-lines"] unicode-lines = ["ropey/unicode_lines"] [dependencies] diff --git a/helix-core/src/chars.rs b/helix-core/src/chars.rs index 549915740..817bbb86b 100644 --- a/helix-core/src/chars.rs +++ b/helix-core/src/chars.rs @@ -91,7 +91,10 @@ mod test { #[test] fn test_categorize() { - const EOL_TEST_CASE: &str = "\n\r\u{000B}\u{000C}\u{0085}\u{2028}\u{2029}"; + #[cfg(not(feature = "unicode-lines"))] + const EOL_TEST_CASE: &str = "\n"; + #[cfg(feature = "unicode-lines")] + const EOL_TEST_CASE: &str = "\n\u{000B}\u{000C}\u{0085}\u{2028}\u{2029}"; const WORD_TEST_CASE: &str = "_hello_world_あいうえおー12345678901234567890"; const PUNCTUATION_TEST_CASE: &str = "!\"#$%&\'()*+,-./:;<=>?@[\\]^`{|}~!”#$%&’()*+、。:;<=>?@「」^`{|}~"; diff --git a/helix-term/Cargo.toml b/helix-term/Cargo.toml index 48365743f..6a4d82859 100644 --- a/helix-term/Cargo.toml +++ b/helix-term/Cargo.toml @@ -16,6 +16,8 @@ build = true app = true [features] +default = ["unicode-lines"] +unicode-lines = ["helix-core/unicode-lines"] [[bin]] name = "hx"