findLineForStop function
Implementation
({int lineIndex, int stopIndexInLine})? findLineForStop(
List<LogicalLine> lines,
CaretStop stop,
) {
for (int i = 0; i < lines.length; i++) {
final idx = lines[i].indexOf(stop);
if (idx >= 0) return (lineIndex: i, stopIndexInLine: idx);
}
return null;
}