src/Pure/PIDE/text.scala
changeset 38570 3fa11fb01f86
parent 38568 f117ba49a59c
child 38577 4e4d3ea3725a
     1.1 --- a/src/Pure/PIDE/text.scala	Fri Aug 20 20:11:25 2010 +0200
     1.2 +++ b/src/Pure/PIDE/text.scala	Fri Aug 20 22:32:15 2010 +0200
     1.3 @@ -31,6 +31,7 @@
     1.4  
     1.5      def map(f: Offset => Offset): Range = Range(f(start), f(stop))
     1.6      def +(i: Offset): Range = map(_ + i)
     1.7 +    def -(i: Offset): Range = map(_ - i)
     1.8      def contains(i: Offset): Boolean = start == i || start < i && i < stop
     1.9      def contains(that: Range): Boolean = this.contains(that.start) && that.stop <= this.stop
    1.10      def overlaps(that: Range): Boolean = this.contains(that.start) || that.contains(this.start)