aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-04-09 15:20:12 +0000
committerBlaž Hrastnik2021-04-09 15:20:12 +0000
commit35b4fe4cd0a23310a3d71242e97ad6c1d081b7c2 (patch)
treec14da6434c2140363fac7f61594272a27a155f45 /helix-core
parent5253f404772ce62256336404b46d6bb9c65e1b10 (diff)
Fix range.overlap()
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/selection.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs
index c8109297..064abec7 100644
--- a/helix-core/src/selection.rs
+++ b/helix-core/src/selection.rs
@@ -59,11 +59,11 @@ impl Range {
#[must_use]
pub fn overlaps(&self, other: &Self) -> bool {
// cursor overlap is checked differently
- if self.is_empty() {
- self.from() <= other.to()
- } else {
- self.from() < other.to()
- }
+ // if self.is_empty() {
+ // self.from() <= other.to()
+ // } else {
+ self.to() >= other.from() && other.to() >= self.from()
+ // }
}
pub fn contains(&self, pos: usize) -> bool {