aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/Cargo.toml5
-rw-r--r--helix-view/src/commands.rs1
2 files changed, 4 insertions, 2 deletions
diff --git a/helix-view/Cargo.toml b/helix-view/Cargo.toml
index d205d7ad..330ae696 100644
--- a/helix-view/Cargo.toml
+++ b/helix-view/Cargo.toml
@@ -15,6 +15,7 @@ anyhow = "1"
helix-core = { path = "../helix-core" }
# Conversion traits
-tui = { version = "0.11", default-features = false, features = ["crossterm"], optional = true}
-crossterm = { version = "0.17", features = ["event-stream"], optional = true}
+# tui = { version = "0.12", default-features = false, features = ["crossterm"], optional = true}
+tui = { git = "https://github.com/fdehau/tui-rs", default-features = false, features = ["crossterm"], optional = true}
+crossterm = { version = "0.18", features = ["event-stream"], optional = true}
once_cell = "1.4"
diff --git a/helix-view/src/commands.rs b/helix-view/src/commands.rs
index a3906b9b..1309d48a 100644
--- a/helix-view/src/commands.rs
+++ b/helix-view/src/commands.rs
@@ -151,6 +151,7 @@ pub fn extend_line_down(view: &mut View, count: usize) {
pub fn split_selection_on_newline(view: &mut View, _count: usize) {
let text = &view.state.doc.slice(..);
// only compile the regex once
+ #[allow(clippy::trivial_regex)]
static REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"\n").unwrap());
// TODO: use a transaction
view.state.selection = selection::split_on_matches(text, view.state.selection(), &REGEX)