int getLineAtOffset(int charOffset) { return _rope.charToLine(charIdx: BigInt.from(charOffset)).toInt(); }