lineCount property

int get lineCount

The total number of lines in the document.

Implementation

int get lineCount {
  if (_bufferLineIndex != null && _bufferDirty) {
    _cachedBufferLines ??= _bufferLineText!.split('\n');
    final newLines = _cachedBufferLines!.length - 1;
    return _rope.lineCount + newLines;
  }
  return _rope.lineCount;
}