findLineStart method

int findLineStart(
  1. int offset
)

Implementation

int findLineStart(int offset) {
  if (offset <= 0) return 0;
  if (_root == null) return 0;
  if (offset > _length) offset = _length;

  final pos = _lastNewlineBefore(_root!, offset);
  return pos + 1;
}