def [](pos, len=nil)
      if pos.is_a?(Range)
        @buffer.get_lines(*range_indices(pos), true)
      else
        start, stop = length_indices(pos, len || 1)
        lines = @buffer.get_lines(start, stop, true)
        len ? lines : lines.first
      end
    end
def [](pos, len=nil)
      if pos.is_a?(Range)
        @buffer.get_lines(*range_indices(pos), true)
      else
        start, stop = length_indices(pos, len || 1)
        lines = @buffer.get_lines(start, stop, true)
        len ? lines : lines.first
      end
    end
Override +#==+ to compare contents of lines.

 @return Boolean
 Access a line or line range.

 @overload [](index)
   @param index [Integer]

 @overload [](range)
   @param range [Range]

 @overload [](index, length)
   @param index [Integer]
   @param length [Integer]

 @example Get the first line using an index
   line_range[0] # => "first"
 @example Get the first two lines using a +Range+
   line_range[0..1] # => ["first", "second"]
 @example Get the first two lines using an index and length
   line_range[0, 2] # => ["first", "second"]