@@ -59,11 +59,11 @@ impl Range {
5959 #[must_use]
6060 pub fn overlaps(&self, other: &Self) -> bool {
6161 // cursor overlap is checked differently
62− if self.is_empty() {
63− self.from() <= other.to()
64− } else {
65− self.from() < other.to()
66− }
62+ // if self.is_empty() {
63+ // self.from() <= other.to()
64+ // } else {
65+ self.to() >= other.from() && other.to() >= self.from()
66+ // }
6767 }
6868
6969 pub fn contains(&self, pos: usize) -> bool {