--- a/src/Pure/PIDE/text.scala Tue Oct 21 15:21:44 2014 +0200
+++ b/src/Pure/PIDE/text.scala Tue Oct 21 17:49:51 2014 +0200
@@ -51,6 +51,8 @@
def is_singularity: Boolean = start == stop
def inflate_singularity: Range = if (is_singularity) Range(start, start + 1) else this
+ def touches(i: Offset): Boolean = start <= i && i <= stop
+
def contains(i: Offset): Boolean = start == i || start < i && i < stop
def contains(that: Range): Boolean = this.contains(that.start) && that.stop <= this.stop
def overlaps(that: Range): Boolean = this.contains(that.start) || that.contains(this.start)