anchor.diff:  
       int lineIndex = _binarySearch(_lineOffsets, position);
       if (lineIndex < 0) {
  -      // Note: we need "- 1" because the binary search returns the
  -      // insertion index of [position], while we are interested
  -      // in the line containing [position].
  -      lineIndex = (~lineIndex) - 1;
  +      // Note: we need "- 2" because 1) we adjust for the "+1" of the return
  +      // value of the search (insertion position), and 2) we are interested
  +      // in the line containing [position], not the insertion position of
  +      // [position] in the array.
  +      lineIndex = -lineIndex - 2;
       }
       assert(lineIndex >= 0 && lineIndex < _lineOffsets.length);
       return lineIndex;
  
positive.code:        return med;
       }
     }
     return ~min;
    }
  
    /**
  
negative.code: 
    /**
     * Returns the position of [item] in [items] if present.
     * Returns "-(insertion_position + 1)" if [item] is not found.
     */
    static int _binarySearch(List items, var item) {
     int min = 0;
  