Function hit_position_aff

Source
pub fn hit_position_aff(
    this: &TextLayout,
    idx: usize,
    before: bool,
) -> HitPosition
Expand description

Hit position but decides whether it should go to the next line based on the before bool.

(Hit position should be equivalent to before=false). This is needed when we have an idx at the end of, for example, a wrapped line which could be on the first or second line.