select

fun EditorSession.select(anchor: DocPos, head: DocPos = anchor)

Set the selection to a range from anchor to head. If head is not provided, creates a cursor at anchor.