diff options
author | Blaž Hrastnik | 2021-11-14 15:12:14 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-11-14 15:12:14 +0000 |
commit | 1817b7f581f579232a216f92e0cac569b1a80c11 (patch) | |
tree | 6a9382b549eafc650d4dd1e55eda40d575980380 /helix-core | |
parent | 35c974c9c49f9127da3798c9a8e49795b3c4aadc (diff) |
minor: Import Range too
Diffstat (limited to 'helix-core')
-rw-r--r-- | helix-core/src/history.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/helix-core/src/history.rs b/helix-core/src/history.rs index bf2624e2..9fe7e530 100644 --- a/helix-core/src/history.rs +++ b/helix-core/src/history.rs @@ -1,4 +1,4 @@ -use crate::{Assoc, ChangeSet, Rope, State, Transaction}; +use crate::{Assoc, ChangeSet, Range, Rope, State, Transaction}; use once_cell::sync::Lazy; use regex::Regex; use std::num::NonZeroUsize; @@ -148,9 +148,7 @@ impl History { .transaction .changes_iter() // find a change that matches the primary selection - .find(|(from, to, _fragment)| { - crate::Range::new(*from, *to).overlaps(&primary_selection) - }) + .find(|(from, to, _fragment)| Range::new(*from, *to).overlaps(&primary_selection)) // or use the first change .or_else(|| current_revision.transaction.changes_iter().next()) .unwrap(); |