anchor.diff:    }
   
     void _recordLineBreakEnd(int charPos) {
  -      _lineBreakEnds.add(charPos);
  -      _lineBreaks++;
  +    _lineBreakEnds.add(charPos);
  +    _lineBreaks++;
  +  }
  +
  +  void _resetResult() {
  +    _charOffset += _result.length;
  +    _result = new List<int>();
  +    _resultOffset = 0;
     }
   
     abstract bool _processNext();
   
     _BufferList _bufferList;
  +  int _resultOffset = 0;
     List<int> _result;
     int _lineBreaks = 0;  // Number of line breaks in the current list.
     // The positions of the line breaks are tracked in terms of absolute
  
positive.code: class _StringDecoderBase implements _StringDecoder {
    _StringDecoderBase()
        : _bufferList = new _BufferList(),
        _result = new List<int>(),
        _lineBreakEnds = new Queue<int>();
  
    int write(List<int> buffer) {
      _bufferList.add(buffer);
  
negative.code:         _result[lineEnd - _charOffset - 1] == CR) {
        terminationSequenceLength = 2;
      }
      var lineLength =
          lineEnd - _charOffset - _resultOffset - terminationSequenceLength + 1;
      String result =
          new String.fromCharCodes(_result.getRange(_resultOffset, lineLength));
      _lineBreaks--;
      _resultOffset += (lineLength + terminationSequenceLength);
      if (_result.length == _resultOffset) _resetResult();
      return result;
    }
  
  