fn selected_str<'s>(
    text: &'s dyn TextBuffer,
    cursor_range: &CursorRange
) -> &'s str