currentLine property

int currentLine

Implementation

int get currentLine {
  var totalCharCount = 0;
  final cachedCurrentChar = currentChar;
  for (var i = 0; i < lines.length; i++) {
    totalCharCount += lines[i].length;
    if (totalCharCount > cachedCurrentChar) {
      return i;
    }
  }
  return lines.length - 1;
}