pub fn movement<T>(
    m: Movement,
    s: Selection,
    layout: &TextLayout<T>,
    modify: bool
) -> Selectionwhere
    T: EditableText + TextStorage,
Expand description

Compute the result of a Movement on a Selection.

returns a new selection representing the state after the movement.

If modify is true, only the ‘active’ edge (the end) of the selection should be changed; this is the case when the user moves with the shift key pressed.