pub fn closest_cursor_index_and_xy<'a, I>(
    xy: Point,
    xys_per_line: I
) -> Option<(Index, Point)>
where I: Iterator<Item = (Xs<'a, 'a>, Range)>,
Expand description

Find the closest cursor index to the given xy position, and the center Point of that cursor.

Returns None if the given text is empty.