aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/commands.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-10-01 03:23:07 +0000
committerBlaž Hrastnik2020-10-01 03:25:03 +0000
commite39bd211d1579bfafa1774f6915af5725041781e (patch)
tree258a92098896a3e903da6b27a076388e2a6a0fb6 /helix-view/src/commands.rs
parent1da0be0aa045a4acd0246d82bf6214f8ec651476 (diff)
argh -> clap to speed up compilation (no syn/proc_macro)
Diffstat (limited to 'helix-view/src/commands.rs')
-rw-r--r--helix-view/src/commands.rs1
1 files changed, 1 insertions, 0 deletions
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)